#avr Logs

Nov 14 2018

#avr Calendar

12:51 AM [1]MrMobius is now known as MrMobius
04:31 AM LeoNerd: cehteh: A Mouser parcel arrived for me. In it (once I've opened it, but after breakfast) I expect to find some 18.4MHz resonators :)
04:31 AM cehteh: purrfect
04:32 AM LeoNerd: Just to double-check - you don't want the DTR capacitor on it? So that means there's no point me putting optiboot on, as it won't be programmable over serial
04:33 AM LeoNerd: Just regular ISP
04:33 AM cehteh: btw when you want to safe some work, then dont solder the 7805, not needed, but you may put 1 or 2 loose in the shipping and when you have a few 0R for bridges (RTC/CTS) .. dont need to solder these either
04:34 AM LeoNerd: Righty; can do
04:34 AM cehteh: optiboot would be fine, when you want to test em, i usually use bootloader for development but press the reset button manually for flashing
04:34 AM LeoNerd: I tend to put 220R for the bridge links, rather than 0. There's no real current flowing normally when it's in use, but 220R limits current in case of drive contention
04:35 AM LeoNerd: So it doesn't damage either CH340 or ATmega
04:35 AM cehteh: should do as well
04:35 AM LeoNerd: Oh I can test them just fine over ISP; I have a little "test all the GPIO pins" program
04:36 AM cehteh: btw, when you ever make a pcb revision, you may consider to make it jumperable to change the USB between uart0 and uart1
04:36 AM * cehteh just disovered that uart0 shares pins with one of the timer, uart1 does not
04:37 AM cehteh: can happen here that i need all 3 16 bit timers but only one uart on some later stage (for now i need 2 uart and 2 16bit timers)
04:37 AM LeoNerd: Ohman there's sooo much fighting and adjusting with all that pin-sharing
04:38 AM cehteh: yeah
04:38 AM LeoNerd: It's why I'm annoyed there's still no arbitrary pin adjjustment crossbar, like the PIC24s have
04:38 AM LeoNerd: On those you can assign any digital peripheral function to any physical IO pin, and remap them dynamically
04:38 AM cehteh: pin 30/31/32 sux ... OC3B/OC4B on pin 32
04:39 AM cehteh: woud be nicer when it would be OC3A/OC4B ..
04:39 AM LeoNerd: ATmega32U4 is the worst for that. The four INT lines shared with UART and I²C
04:39 AM cehteh: anyway i can manage for now
04:39 AM LeoNerd: Because nobody /ever/ needed an interrupt-driven I²C slave...
04:40 AM cehteh: nah .. everybody is supposed to use PCINT :D
04:40 AM LeoNerd: It only supports PCINT on one of its ports; PORTD. Which has three of its pins taken by the SPI controller.
04:40 AM LeoNerd: "yay"
04:40 AM cehteh: haha
04:40 AM LeoNerd: It really is a terrible chip in lots of ways. Its one redeeming feature is it has native USB
04:41 AM LeoNerd: One of the rare very few ATmegas that does
04:41 AM cehteh: yeah i discovered that there is PCINT on all pins on the 328pb ... somehow that euncurages bad design :)
04:41 AM LeoNerd: Every other ATmega (or even ATtiny) I've ever seen had PCINT basically everywhjere
04:41 AM LeoNerd: I'm using all three PCINTs on my tiny4313 for different things
04:42 AM cehteh: ah .. usually i never cared, i prefer input capture or INT
04:42 AM cehteh: this is the first project where i need to use PCINT on one port
04:42 AM LeoNerd: This project is basically just a fancy GPIO/button/LED controller, so I have lots of buttons attached. And a rotary encoder
04:42 AM LeoNerd: PCINTs are fine for that
04:43 AM cehteh: they are not overly bad, but if there are are better ways to handle things one should use those
04:43 AM LeoNerd: How else would you do buttons?
04:43 AM cehteh: depends
04:43 AM cehteh: polled, matrix, analog ...
04:44 AM cehteh: depends on how fast/precise/sychronous/async you need to react
04:44 AM LeoNerd: I've only got 6 buttons anyway so matrix is a bit overkill. Analog and polling -might- work, but code structure makes that awkward
04:45 AM cehteh: i need pcint here because those are end-switches and also probe a big fat emergency button :)
04:45 AM LeoNerd: I might at some point restructure the code to avoid any ISR other than the USI ones, for I²C slave speed
04:45 AM LeoNerd: But it works fine for now
04:45 AM cehteh: thats certainly where PCINT shines
05:11 AM LeoNerd: Ah; and how lucky - my new stencils for this board arrived just now as well, so perhaps I'll have less paste oozing issues
05:11 AM * LeoNerd dislikes TSSOPs
05:11 AM LeoNerd: I'm considering switching to the SOIC-16 (and crystal-less) CH340G on the next board revision
05:13 AM cehteh: yep surprised me that the USB thing needed a crystal
05:13 AM LeoNerd: A lot of the "older" tech does
05:14 AM LeoNerd: Newer ones all have internal PLLs synced to incoming data
05:16 AM LeoNerd: If you only need TX/RX there's even smaller chips; PL2303SA is a SOIC-8, or CH340E is TSSOP-10 which also adds CTS/RTS. But neither has DTR, which annoyingly I need to put on here for the Arduino-style reset control :/
05:17 AM cehteh: how feasible is it to add through hole components to the board? i am going for a R-7850-05 .. imo this mini vreg on the devel boards are just useless you either have 5V from elsewhere/usb OR you need some beefier vreg anyway (or higher input range)
05:17 AM cehteh: i dont want you to include that vreg, but having provisions like holes would be nice
05:18 AM cehteh: vreg, fuse, zener, protection diode, 2 caps
05:18 AM twnqx: >_>
05:18 AM twnqx: it's 2018, how can you even consider an LDO
05:19 AM cehteh: LDO *is* fine for a lot applications
05:19 AM cehteh: but its not a catch-all backup
05:19 AM twnqx: if you want to maximise inefficiency, sure
05:19 AM cehteh: actually not
05:20 AM cehteh: when you have some controller which draws only very little current and your input voltage is not overly high then LDO's are by far the best
05:20 AM twnqx: 5V to 3.3V with an LDO is always 34% loss
05:21 AM cehteh: yes, but when you only draw 1mA then you loose 340µA .... pretty ok or?
05:22 AM cehteh: no switching vreg can do that
05:22 AM cehteh: ok plus quietcient current, but there are pretty good ldo's available for that
05:22 AM LeoNerd: Yah; static losses in the switching setup make switching regs less efficient at really small current
05:23 AM cehteh: also LDO excel at stability and ripple
05:23 AM LeoNerd: Yah but if you're just powering MCU you don't really care about either
05:23 AM twnqx: yeah, but just before you were talking exactly about <cehteh> [...] you either have 5V from elsewhere/usb OR you need some beefier vreg anyway
05:23 AM twnqx: uh
05:23 AM cehteh: when i want to drive some simple analog sensors -> LDO for sure
05:24 AM twnqx: postreg LDO
05:24 AM twnqx: from 3.35 +-0.05 ripple to 3.3V
05:24 AM LeoNerd: Oh, I agree about the onboard 7805. I only really include those to be "the same as" the Arduino nano and similar boards, as I expect some folks care about that
05:24 AM LeoNerd: Powering projects from 9V batteries and the like
05:24 AM LeoNerd: Personally I don't use it ;)
05:25 AM cehteh: as soon you only drive few leds that onboard might be too tiny
05:25 AM cehteh: leds could be already optocouplers (ok most of those need less current than leds)
05:25 AM cehteh: esp when you have 12V input
05:25 AM cehteh: 7-9V is barely ok
05:26 AM cehteh: here i have 24V coming in and need to cope with it, so -> switching reg
05:26 AM twnqx: speaking of 24V
05:26 AM twnqx: how would go about interfacing 24V to a µC's GPIO? :P
05:26 AM cehteh: input? output? fast? noise? transients?
05:27 AM twnqx: input, 24V -> mechanical switch -> 100k resistor -> ??? -> µC input with integrated pulldown
05:27 AM twnqx: software debounce i guess
05:27 AM cehteh: R / zener?
05:28 AM twnqx: yeah, i guess zener it will be , though i gave a somewhat better circuit at hand
05:28 AM twnqx: which is basically a protected mosfet inverter (and will require pullup resistors instead, but that's not a prob)
05:29 AM cehteh: there are many ways to do that, depending on the circumstance
05:30 AM cehteh: that 'level shift' Fet thing will work as well
05:30 AM twnqx: hm
05:31 AM cehteh: then you have input/output even
05:32 AM twnqx: i don't think that'll work with 24V/open instead of GND/open
05:34 AM twnqx: about the zener... i am slightly scared of the prospect of it being too slow
05:35 AM twnqx: might need a capacitor per line then
05:35 AM cehteh: you saied switch?
05:35 AM twnqx: mechanical
05:35 AM cehteh: yes
05:35 AM cehteh: that will be the slowest part anyway
05:35 AM twnqx: but i can't change it from switching to gnd
05:36 AM twnqx: it turns on 24V, and i don't want that voltage to reach the µC input
05:36 AM twnqx: so the zener breakthough time is relevant
05:37 AM cehteh: http://tinyurl.com/yba4h746
05:37 AM twnqx: nah, the switch is always high side
05:37 AM twnqx: that's beyonf my control.
05:38 AM twnqx: switch to gnd would be easy
05:40 AM cehteh: i think that should be 'reverseable'
05:41 AM twnqx: it's not, in my case
07:01 AM tecdroid: hi there
07:03 AM kakimir: hello
07:04 AM tecdroid: anybody awake? i'm sitting here for some hours now and try to find out why my atmega328p doesn't measure anything with adc. i try to read the internal temp and always get 0x2ff as a result... i just set up ADEN, REFS1:00 for internal 1.11v, ADMUX=8 and ran ADSC.. it seems to run it's cycles but gets always this result
07:04 AM kakimir: did you wait 1ms
07:05 AM kakimir: after refs to 1.1
07:05 AM tecdroid: eeeer, no
07:05 AM tecdroid: mom
07:07 AM kakimir: I think internal thermometer needs also delay
07:07 AM kakimir: after you mux it in
07:07 AM kakimir: dial it in to say
07:07 AM kakimir: reffer to datasheet
07:08 AM tecdroid: didn't find anything about that.. maybe i'll read again..
07:10 AM kakimir: also check correct bits for ADC8 or whatever for reading thermometer
07:10 AM kakimir: it most likelly is not decimal 8
07:10 AM kakimir: in attiny44A it's like decimal 21 or so
07:11 AM kakimir: ended up reading AGND first
07:11 AM kakimir: as it was decimal 8
07:12 AM tecdroid: on mega328 it's the lower 4 bit of ADMUX
07:12 AM kakimir: http://paste.dy.fi/ceF
07:13 AM kakimir: most likelly ADMUX issue
07:13 AM kakimir: given that you have done successful ADC conversions before
07:14 AM tecdroid: i get the same result when i try any other adc
07:14 AM tecdroid: since pin is free running, there should be any low value read
07:25 AM tecdroid: just typed some test code: https://pastebin.com/LB2zusRH
07:25 AM tecdroid: and it reads 1023..
07:25 AM tecdroid: maybe that arduXX board is defect?
07:27 AM twnqx: cehteh: i just realized... with the input resistor and the pulldown, i have a voltage divider that won't drive the input correctly (especially as I don't know the exact value)
07:28 AM cehteh: yes you almost certainly want some regulation part
07:29 AM twnqx: even with a zener it won't reliably work, the inverter circuit seems more reasonable (though effort)
07:29 AM cehteh: depends on how clean your signal is
07:29 AM tecdroid: no, another board has same result
07:29 AM twnqx: as clean as it can be after a few dozen meters of wire in walls
07:30 AM cehteh: yeah sure inverter does some signal massaging
07:30 AM twnqx: also solves current/voltage issues
07:30 AM cehteh: opamp may work as well
07:30 AM cehteh: and i bet you can solve it with a ne555 :)
07:31 AM twnqx: except the space issues, as i need to put 8 input drivers per ca. 10x30nm
07:31 AM twnqx: (for a total of 32)
07:32 AM twnqx: meh.
07:32 AM twnqx: 10x30mm* nm would be more difficult.
07:33 AM kakimir: hey guise
07:33 AM kakimir: internal thermometer
07:34 AM kakimir: I get only deflection of like + - 15Celsius to converted value
07:34 AM kakimir: I cool down the chip with cooling spray
07:34 AM kakimir: drops from 21 to 9celsius and wont really go under that
07:38 AM cehteh: twnqx: i bet there are IC's for that, hey have you considered some optocoupler?
07:38 AM twnqx: i... have, but i really liked the idea of reusing the pc with nearly any voltage
07:38 AM twnqx: pcb*
07:40 AM cehteh: resistor/zener in front of opto should do that methinks .. but better ask someone who knows better
07:40 AM twnqx: nah, you need to tune the resistor to the input voltage
07:40 AM cehteh: ah there is this jfet-current-regulation thing, how is that?
07:41 AM tecdroid: seems that my adc prescaler must not be 0..
07:45 AM twnqx: i guess i'll just go with my original design, as sucky as it will be to solder: https://i.imgur.com/ujWOkjK.png
07:53 AM kakimir: wow I had bad admux code myself
07:53 AM tecdroid: kakimir: where do you get the conversion between mV and °C ? datasheet says it's 1mV/°C and runs from some offset.. this offset isn't what I know.. and additionally, I get values which are varying by about 10mV
07:53 AM kakimir: it cleared REFS bits
07:54 AM tecdroid: XD
07:54 AM kakimir: my temperature measurement seemed to work
07:54 AM kakimir: but it didn't
07:54 AM kakimir: it was all the time referenced to VCC
07:54 AM twnqx: cehteh: actually, there IS a neat chip. but 10€ + VAT for 16 pins.... though it's really, really nice
07:54 AM tecdroid: should be REFS1:0 = 0b11
07:54 AM kakimir: I interpolate absolute ADC value into celsius
07:55 AM kakimir: per datasheet "Temperature vs. Sensor Output Voltage (Typical Case)"
07:55 AM kakimir: in my paste it's divided in 2 cases
07:55 AM kakimir: under 25C and above
07:56 AM tecdroid: i tried that.. and it got really hot in here..
07:56 AM tecdroid: where does that interpolate come from?
07:59 AM kakimir: you want my interpolate code?
08:00 AM tecdroid: as i understand, it's just an offset (TOS) but cannot find any usable offset value
08:01 AM kakimir: http://paste.dy.fi/cGO
08:01 AM kakimir: this is my temperature measurement apart from actual ADC functions
08:02 AM kakimir: interesting.. if and else have different amount of parenthis in their return statements
08:03 AM kakimir: notice that when I return value I sum calibration offset to value
08:03 AM kakimir: that is retrived from EEPROM in boot
08:04 AM tecdroid: there's still refsvcc set
08:04 AM kakimir: after I complete conversion
08:04 AM tecdroid: after read.. yes
08:05 AM kakimir: because it's exception in my code to use 1.1v refs
08:05 AM kakimir: I return it to "normal state"
08:07 AM kakimir: you can find typical ADC values per temperatures in datasheet most likelly
08:07 AM kakimir: it's just one approach
08:07 AM kakimir: another is to offset adc value and assume 1LSB = 1C
08:09 AM tecdroid: i got 357mV wich must be arount 60°C ... following the datasheet
08:09 AM tecdroid: but it doesn't change anyway..
08:10 AM kakimir: I don't think you should do conversion to millivolts at all
08:10 AM kakimir: check your mux code
08:11 AM kakimir: channel switching doesn't touch REFS bits?
08:11 AM kakimir: refs bits ok
08:14 AM kakimir: if you are porting code from another chip registers differ
08:16 AM tecdroid: no
08:17 AM kakimir: can you get raw adc values to start from there
08:17 AM tecdroid: i don't port.. just started writing code by reading the datasheet
08:17 AM kakimir: and see if those change
08:17 AM kakimir: simplify to find the issue
08:17 AM Emil: Consider joining #avrs
08:19 AM tecdroid: simplify? how? https://pastebin.com/LB2zusRH that's my current code
08:20 AM tecdroid: okay.. need to rescue some kids from school ;) back in about 2 hours..
09:02 AM rue_mohr: Emil, do you not think its kinda pathetic that you need to stay here and try to pull people over to your channel?
09:03 AM rue_mohr: I realize that you can never back out and admit you might have been wrong, but geez
09:27 AM tecdroid: back
09:30 AM rue_mohr: :)
09:30 AM rue_mohr: gtg to work, buy!
10:06 AM nohit: rue how was Emil wrong ?
10:07 AM nohit: and he is just helping people to get assitannce since this channel is quite dead
10:38 AM nabil_ is now known as nabil
10:45 AM Rickta59: does SprinterSB ever show up here?
10:46 AM Rickta59: * the guy who added the __flash and __memx thing to avr-gcc
10:58 AM kakimir: changing to better AVR core has impact on binary size
10:58 AM kakimir: like -30%
11:27 AM cehteh: kakimir: hardware multiplier?
11:31 AM skz81: cehteh, 30% code size for embedding SW mult ?? Seems a lot... But depends absolute size of other 70% :p
11:32 AM skz81: depends ON*, even
11:36 AM kakimir: I mean I had basic functions on attiny20 and it was 2k
11:37 AM kakimir: I have done some higher level stuff on attiny44a based on that same basic code I had for attiny20
11:37 AM kakimir: it's like 2.3K
11:37 AM kakimir: at the moment
11:37 AM kakimir: on attiny20 just adding some simple function did 100bytes more just like that
11:38 AM cehteh: skz81: dunno how big the rest of his program is, but when it pulls in some math lib it can bloat a bit
11:39 AM cehteh: there are also some other improvements on new cores
11:40 AM kakimir: there is more instructions to 44A core
11:40 AM kakimir: like 5 of them more compared to 20 core
11:40 AM cehteh: i once had something which barely didnt fit on tiny13 so i compiled for tiny45 .. and it was small enough to fit on the 13 ;D .. but i didnt test if it would have worked, just used the 45
11:40 AM kakimir: maybe more general registers
11:41 AM kakimir: cehteh: compile it again for tiny13 and it's still heavy
11:45 AM kakimir: Program Memory Usage : 2350 bytes 57,4 % Full
11:45 AM kakimir: Data Memory Usage : 33 bytes 12,9 % Full
11:45 AM kakimir: it just stays there under 2.4K
11:48 AM cehteh: tried -flto?
11:52 AM kakimir: what is that?
11:52 AM kakimir: I touched nothing
11:52 AM kakimir: also I think I have -01 atm in use
11:52 AM kakimir: and for tiny20 I had -0s
11:53 AM kakimir: I don't know how to bake the cake
11:53 AM kakimir: I just mix the flours and throw it in oven
11:55 AM kakimir: usually it comes out good, about the right size and taste
11:55 AM kakimir: me go bbl>
01:24 PM polprog: its not -0 but -O (O the letter not zero)
01:36 PM cehteh: do you guys know how to turn a component in kicad schematic/component editor at an arbitary (60°) angle?
01:36 PM * cehteh wants to create a symbol for a 3 phase motor/stepper
01:39 PM cehteh: https://4.bp.blogspot.com/-4WDR8P24XVs/VnQjrK5z2fI/AAAAAAAABwQ/zB9xY9k-AoM/s1600/Delta%2BConnection%2Bfor%2Bthree-phase%2Bmotors.jpg
01:39 PM cehteh: alike
01:41 PM polprog: right click -> properties or something like that
01:41 PM polprog: the properties window has a rotation text field
01:42 PM polprog: ugh
01:42 PM polprog: nope, it only allows for n*90 degree rotations
01:43 PM cehteh: thats what i found out so far :D
01:43 PM polprog: thats stupid, lol
01:44 PM cehteh: well just using some substitute now, should be ok
01:45 PM polprog: this is what i dislike about kicad
01:45 PM polprog: its version 5 but they still have 3 separate redneres for pcbnew and each one is missing something
01:46 PM polprog: renderers*
01:46 PM cehteh: maybe there is a reason to constrain it to the grid
01:46 PM polprog: or silly stuff like this
01:46 PM polprog: probably simplifies stuff a lot
01:58 PM vmt: are there any easy-to-use loonix programs which rasterize ttf/otf to bitmaps, and now don't be snarky
01:59 PM vmt: ...and i know writing one with freetype isn't exactly hard, but i'm trying to be lazy
05:33 PM cehteh: ohey .. either i found a bug on the 328pb datasheet or i am totally fucked up :D
05:34 PM cehteh: timer 3 WGM 8 controlled by ICR1 not IRC3
05:34 PM cehteh: ICR3
05:35 PM cehteh: must be a typo in the datasheet, some monkey copy pasted the tables
06:03 PM kakimir: hello guise
06:04 PM kakimir: advanced level question: does constant sampling of bandgap cause it's level to drop?
06:07 PM cehteh: sample as in what?
06:07 PM cehteh: avr adc?
06:07 PM cehteh: then no,
06:08 PM cehteh: but it can only provide very little current, when you do odd things with the AREF pin you see odd things happen
06:09 PM cehteh: also ADC frequency needs between some recommended speeds, not too slow, not too fast
06:09 PM cehteh: and you can put a 100nF cap on AREF to GND to improve stability, but read datasheet, some parts also want you to set a flag when doing so
06:10 PM cehteh: and you may oversample the ADC, rolling average/lowpass as much/little as makes sense
06:12 PM cehteh: lowpass RC filter on the analog in is also recommended
06:13 PM cehteh: and finally .. i am going to bed .. n8
06:13 PM kakimir: I use AREF pin as ADC input
06:13 PM kakimir: not as reference
06:13 PM kakimir: does it still do weird stuff?
07:43 PM rue_mohr: nohit, so, it would only be fair to sit in his channel and ask people to come over to avr when his is quiet?
07:44 PM nohit: no because #avr is the place people usually find
07:45 PM nohit: and they are gently guided to more active place to find help
07:45 PM nohit: no harm done to anyone
07:45 PM rue_mohr: you think that is a normal thing then
07:46 PM rue_mohr: like leaving 400 bots in a channel idling
07:46 PM nohit: what ? 400 bots ?
07:46 PM rue_mohr: or like program that take up an extra G of memory they dont really need?
07:47 PM rue_mohr: thats a good part of what emils problem was
07:47 PM rue_mohr: he didn't care that there were a LOT of bots collecting up and he didn't understand how they suffocate a channel
07:47 PM rue_mohr: ~I'm just insane!~
07:48 PM rue_mohr: besides, he's asked people to come to his channel when they WERE being helped
07:48 PM rue_mohr: so, I'm pretty sure thats not his goal
07:49 PM rue_mohr: there is an inndecent immaturity about it, I'm not sure what to think of Emil
07:49 PM rue_mohr: but I'm pretty sure I dont want to be a part of it
07:49 PM rue_mohr: tho it would be fun }:]
07:54 PM rue_mohr: I think 11.11 didn't go well for china
07:56 PM rue_mohr: in 12 years he might understand
07:56 PM rue_mohr: but until them his dignity means he must maintain his own channel
07:58 PM nohit: but this channel has shown signs of life recently
07:58 PM nohit: which is good
07:58 PM rue_mohr: 80/20
08:06 PM nohit: in general, you are quite dick to newbies who come here
08:07 PM rue_mohr: I hate people who in sist on complaining about expensive debug hardware they dont need
08:07 PM nohit: and you dont maintain the channel, and you dont let other people maintain it when you clearly dont have time for it
08:07 PM nohit: take care of spam bots, update topic etc
08:09 PM rue_mohr: so, your saying, i should sit in #avrs and learn how its done
08:10 PM nohit: and if people want debug hardware, its their choice, you cant decide for them. and debugger is a basic tool for every programmer.
08:10 PM rue_mohr: yes, I shouldn't complain about monkey coders, they been around since computers were in their infancy
08:10 PM rue_mohr: it erks me tho
08:13 PM rue_mohr: like video games
08:13 PM rue_mohr: yes, people like to waste time in their life playing them
08:13 PM nohit: and rue, if you are so good programmer that you claim to be, then how come you dont do it for a living, as a career ?
08:13 PM rue_mohr: some people a lot
08:14 PM rue_mohr: nohit, cause I live in the middle of nowhere, and its an up-and-down job style
08:14 PM rue_mohr: companies turn over a lot
08:14 PM rue_mohr: I left the software company to get a regular 9-5
08:14 PM rue_mohr: that wasn't 3 years on-3 months off
08:14 PM nohit: good programmers always find jobs
08:14 PM rue_mohr: but it paid for my house!
08:14 PM nohit: it can be done remotely
08:15 PM rue_mohr: your not hearing, me, its not the kinda job I wanted
08:15 PM rue_mohr: besides, my cholesterol turnes out to be so high, that if I'd continued programming, I'd be dead
08:23 PM nohit: do you have an education for programming or are you self taught ?
08:24 PM rue_mohr: its a part of me
08:25 PM vmt: wtf kind of an answer is that?
08:25 PM rue_mohr: a realistic one
08:26 PM vmt: more like "vague", which implies a reluctance to answer
08:26 PM rue_mohr: hah I been programming computers since 89
08:26 PM rue_mohr: hah
08:26 PM vmt: '89, good vintage
08:27 PM rue_mohr: I was doing other types of programming before that, just not on computers...
08:27 PM vmt: interesting, do tell
08:27 PM nohit: have you ever done non-low level programming ?
08:28 PM rue_mohr: higher than delphi, hmm
08:28 PM rue_mohr: does macromedia flash count ?
08:28 PM vmt: what exactly did you "program"?
08:29 PM rue_mohr: all the commercial stuff was educational game programming
08:29 PM nohit: cool
08:29 PM vmt: what does that constitute?
08:30 PM nohit: with delphi ?
08:30 PM rue_mohr: but I think I'v done more for me than when I was dling the game programming
08:30 PM vmt: the "just not on computers" -bit still eludes me
08:30 PM rue_mohr: I think we worked with about 4 languages there, one of them was a proprietory language for one of the clients
08:31 PM vmt: can't really get a straight answer out of you can i?
08:31 PM rue_mohr: mechanical programming machines, electronics
08:31 PM nohit: i dont know much about delphi but i think its much like visual basic
08:31 PM rue_mohr: pretty simplistic stuff, but looking back, it was programming
08:31 PM rue_mohr: its advanced pascall
08:31 PM rue_mohr: which isn't that high :)
08:32 PM rue_mohr: which languages do you consider high level?
08:32 PM rue_mohr: c++? or higher?
08:32 PM nohit: we had turbo pascal at school
08:32 PM nohit: in the 90s
08:32 PM rue_mohr: yup, didn't do a lot with that
08:33 PM rue_mohr: only a few graphical things, didn't keep any
08:33 PM rue_mohr: tho iirc I had no linux pascall compiler
08:33 PM vmt: the abstract y-axis of programming is *not* always tied to the inherent nature of whichever language you are using
08:33 PM rue_mohr: I prefer C cause I know how it translates to machine instructins
08:34 PM rue_mohr: it was pretty interseting, there was a point that I realized that it didn't matter which language I was programming in, It was all the same
08:34 PM rue_mohr: less lisp....
08:34 PM * rue_mohr shudders
08:35 PM vmt: well, that's not true
08:35 PM vmt: however, the language is never the platform, i would agree on that implication
08:36 PM rue_mohr: my ability to get things done was starting to traverse, it didn't matter what laguage I was using
08:37 PM rue_mohr: it was really cool
08:37 PM rue_mohr: I did a game in a day at one point it was a self-challange
08:37 PM rue_mohr: they usually took people a week
08:38 PM vmt: if you dropped programming for a living, what are you doing now?
08:38 PM rue_mohr: it was around then that I realized that the limit of my speed programming was that I couldn't type fast enough
08:38 PM rue_mohr: I'm an electrcian
08:38 PM rue_mohr: its got nothing on building robots
08:39 PM rue_mohr: its nice to have a good paying moderatly simple job
08:39 PM rue_mohr: today we spent 8 hours getting 3 cat6 lines down a 100' hallway
08:39 PM rue_mohr: thats the kinda challenges work gives me
08:40 PM rue_mohr: I mean, yea, sometimes people need help with a plc or something, but whatever
08:40 PM vmt: if you truly are as productive as you say, granted your work history and/or experience, it really should be a piece of cake for you to find a job
08:40 PM vmt: since you are seemingly passionate about programming
08:40 PM rue_mohr: it was kinda fun when the recycling center asked us to make a bailer work that had been cut into 6 pieces and re-arranged with some peices missing
08:41 PM rue_mohr: but thats something else I leanred
08:41 PM rue_mohr: you dont get a job doing what your pationate about
08:41 PM rue_mohr: it kills it
08:41 PM vmt: on the contrary
08:41 PM rue_mohr: the electrical work is different enough from the hobby stuff that it dosn't wreck it
08:42 PM rue_mohr: no its true, making your passion into work wrecks it
08:42 PM vmt: it gives you real challenges and you have to step on up to the plate to meet the deadlines
08:42 PM rue_mohr: I dont care if you dont beleive me, lots of people hold that as a fundamental truth to strive towards
08:43 PM rue_mohr: but I'v seen/experienced it several times
08:43 PM vmt: possibly people work differently, however i for one am not convinced at all of just about half of the things you say
08:43 PM rue_mohr: ok
08:44 PM rue_mohr: I hope you never have something you loved doing killed by it being made your only way to stay alive
08:44 PM rue_mohr: sorry that reads bad
08:44 PM rue_mohr: I'm coding
08:45 PM vmt: an experienced developer having closer to three decades of experience and work history, will always find a high-paying job, one with which you don't live from one paycheck to the next one
08:45 PM rue_mohr: thats part of the problem tho, you keep having to job hunt
08:46 PM rue_mohr: projects ending and companies folding or being bought and sold
08:46 PM vmt: and a person with such a track record will have little-to-no difficulty in finding new ones
08:46 PM rue_mohr: screw it, I have a reliable job fixing plugs for mr and mrs sweetold
08:46 PM vmt: and a person such as that is also prone to be recruited by a prominent and longstanding company
08:46 PM rue_mohr: you dont get it tho, I DONT AHVE TO LOOK FOR WORK
08:47 PM rue_mohr: I have had the same job 12 years
08:47 PM vmt: again we've come a full circle and back to the point of me questioning your self-proclaimed abilities
08:47 PM rue_mohr: their hobby now
08:48 PM rue_mohr: I'm a nice powerfull hobby coder
08:49 PM vmt: first of all, being an elechicken as a dayjob takes away the better part of your time on a day-to-day basis
08:50 PM vmt: so that hinders your ability to learn and be productive wrt. your abilities in programming
08:50 PM rue_mohr: bah, I do lots of things
08:50 PM vmt: and, the greatest motivator to become best at something, is when you've got something at stake.
08:50 PM rue_mohr: and gee, I'v seen so much come and go, I'm happy where I am
08:50 PM rue_mohr: I been there
08:50 PM vmt: well, "best" being relative. let's just say, great instead of just good.
08:50 PM rue_mohr: I been at the point where Ic ant be better unless I'm more people
08:51 PM vmt: now that's a bold statement
08:51 PM vmt: hubris is a thing.
08:51 PM rue_mohr: I know exactly how to code better than any team out there that had even half-ass capable people
08:51 PM rue_mohr: the world doesn't want to go there
08:52 PM rue_mohr: people ARE mostly just code hackers
08:52 PM rue_mohr: to the point nobody really cares if code is done right or if it works properly
08:52 PM rue_mohr: THATS WHY PEOPLE NEED THOSE DEBUGGERS
08:52 PM vmt: while i agree on the notion of software being complete and utter garbage for the most part only enabled by moore's law, so on and so forth...
08:53 PM nohit: omg
08:53 PM vmt: but your hubris is starting to sound like borderline terry a davis -shit
08:53 PM rue_mohr: pose a thought: what if I'm right?
08:54 PM vmt: 9/10 top dentists worlwide recommend against blind faith
08:54 PM vmt: what do you have to show for it?
08:54 PM rue_mohr: I'v tried too many times to make people see the light, I give up
08:54 PM vmt: worldwide, even
08:54 PM rue_mohr: 'cept those debugges, that erks me
08:55 PM rue_mohr: I found code from '67 that was hacked togethor
08:55 PM rue_mohr: after '67, someone ported it to basic, then c, then java
08:55 PM rue_mohr: the origional fortran was still all thru it
08:55 PM rue_mohr: hack, on a hack, on a hack
08:56 PM vmt: what is it that you've got to show for your claims, e.g. how you've been at the point where you could not possibly develop yourself any further?
08:56 PM rue_mohr: _51_ years
08:56 PM rue_mohr: how can I show you the copyright code I banged off in a day?
08:56 PM rue_mohr: how can I explain that it usually took a week for any of the other guys in the compnay to write?
08:57 PM rue_mohr: it doesn't matter
08:57 PM rue_mohr: it doesn't even matter if I was the best programmer in the universe or not
08:57 PM vmt: you are, in effect, just explaining it right now
08:57 PM rue_mohr: I'v offered my oppinions for your consideration
08:57 PM rue_mohr: you can accept it, or not, no shirt of my back
08:58 PM nohit: dont show code, just describle the most interesting projects
08:58 PM vmt: also, you are comparing yourself against the "other guys in the company"
08:59 PM vmt: which leaves me with a bunch of questions. what kind of a company was this? was it the company policy to hire monkeys?
08:59 PM rue_mohr: the game was a pokemon game, I used my own engine in the game to build a dynamic type of state engine, it was super flexible and made the process fast to develop
09:00 PM rue_mohr: IncludeMap was a neato utility I still have
09:00 PM vmt: okay, be coherent now.
09:00 PM vmt: further describe the state machine, please
09:00 PM rue_mohr: it goes thru C souce and, by following headers, it shows you the dependency structure of a project
09:00 PM rue_mohr: that came togethor quick too
09:00 PM vmt: irrelevant wrt. the game itself, basically a build tool
09:01 PM rue_mohr: vmt, I actaully wish I had a copy of the source
09:01 PM rue_mohr: I been trying to recreate it in C for a while
09:01 PM vmt: rue_mohr: i don't need to see code, just do elaborate on the design and details
09:02 PM rue_mohr: you build expected execution paths, and rewrite them if things come up that make you need to
09:02 PM rue_mohr: I need more experience with combining state machines
09:02 PM rue_mohr: there is a lot of power there
09:03 PM rue_mohr: but neural network approaches have come up recently, which can do awesome stuff
09:04 PM rue_mohr: but all the neural network stuff is being hacked to do statefullness, I have ideas I want to try before I share
09:04 PM vmt: i don't exactly understand why would you take this kind of an approach
09:04 PM vmt: if this "build expected execution paths" is still related to the game, i don't quite follow where the gain is in doing this?
09:05 PM rue_mohr: because you dont need to try to figure out where you are on the fly
09:05 PM rue_mohr: the execution path is made of function pointers
09:05 PM rue_mohr: you just exec the next one
09:06 PM vmt: and for what gain?
09:06 PM rue_mohr: you can insert extra things or invalidate the path and build a new one
09:06 PM vmt: i mean, it sounds like a nice idea to do for shits and giggles
09:07 PM rue_mohr: it simplifies a lot, in the same way state machines simplfy things
09:07 PM vmt: what functionality did the game itself actually have?
09:07 PM rue_mohr: those games were something it accelerated a lot
09:08 PM vmt: what functionality did the game itself actually have?
09:08 PM rue_mohr: they were usually something that you came into, got a tutorial, performed some tasks, got a reward, and carried on
09:10 PM nohit: educational games ?
09:10 PM vmt: you're still being very vague about the game itself
09:11 PM rue_mohr: TLc and creative wonders
09:11 PM vmt: to me, it sounds like what you were building was some overgeneralized (and sub-par-performant) state machine to control execution flow, instead of a game itself
09:14 PM rue_mohr: after the whole statemachin-ed-ness was out of the way, the game stuff was easy
09:16 PM nohit: but yeah, you clearly dont have anything to show for, just as expected. so i dont think you can call anyone bad coder, when you havent even worked on a project that's complicated enough to understand that debugger is ofter a must have
09:16 PM nohit: youre just making stuff up as you go
09:17 PM rue_mohr: :)
09:17 PM rue_mohr: good, you can ignore everythign I said and dismiss me as crazy
09:17 PM rue_mohr: THANK GOD YOU DONT HAVE TO BELIEVE ANY OF THE THINGS I SAID!!!!
09:18 PM rue_mohr: and the question remains, HOW the hell is that error in MY 3d library....
09:18 PM rue_mohr: double Dist3d (point3d_t *this, point3d_t that) {
09:18 PM rue_mohr: return sqrt(SQR((this->x)-(that->x)) + SQR((this->y)-(that->y)) + SQR((this->z)-(that->z)) );
09:18 PM rue_mohr: ^^^ WTF!!!!
09:19 PM rue_mohr: could it be I banged this out one midnight and have never used it?
09:19 PM rue_mohr: ????
09:21 PM rue_mohr: (it wouldn't be the first library I just decided to bang out one midnight and have never actually used)
09:22 PM vmt: have you considered the possibility that you are actually crazy?
09:22 PM rue_mohr: no, it was used in my bvh player
09:22 PM rue_mohr: vmt, by the definition of crazy, I know I am
09:23 PM rue_mohr: but I also know its not me, its the rest of the world
09:23 PM vmt: furthermore have you considered this very thing might invalidate a lot of the things you say?
09:23 PM vmt: though, this is kind of a catch-22 sortatypeathing.
09:23 PM rue_mohr: in a non-crazy world we would not be using gas engines anymore
09:23 PM vmt: oh is that so?
09:23 PM vmt: what would we be using?
09:24 PM rue_mohr: in a crazy world there would not be homelss people AND vaccant buildings
09:24 PM rue_mohr: er, haha
09:24 PM rue_mohr: botched it there 'ol boy!
09:24 PM rue_mohr: I did indeed!
09:25 PM rue_mohr: in a non-crazy world, trump would not have even had the opportunity to be president
09:25 PM rue_mohr: he would have failed the test and been disqualified
09:26 PM vmt: could you please answer my question?
09:27 PM rue_mohr: sorry, I'm coding, and only half paying attention
09:27 PM rue_mohr: oh cars, electric.
09:27 PM vmt: powered by?
09:27 PM rue_mohr: dear god, I wrote that bvh player 8 YEARS ago!!
09:28 PM rue_mohr: solar/damns, whatever
09:28 PM vmt: also, there are a myriad of other things running on internal combustion engines, than cars
09:28 PM vmt: both solar and hydro are tied to rivers
09:28 PM vmt: no.
09:28 PM vmt: tied to location, was what i wanted to say.
09:29 PM rue_mohr: ok good, then you have proven the world is not crazy
09:29 PM vmt: you would have to facilitate replacing gas cars with electric ones by MASSIVELY upgrading electric grids EVERYWHERE
09:29 PM rue_mohr: oh... nothing USES that fn, it must be new
09:30 PM rue_mohr: your ok, you alrady proved it
09:30 PM rue_mohr: we must be on the right path, you said so
09:30 PM rue_mohr: tho, I'm gonna be intersted to see what you say in 3 years about it
09:30 PM vmt: and an insane ramp up in generating electricity, not possible by solar or hydro alone
09:31 PM rue_mohr: so, this program should work now...
09:31 PM vmt: you would pretty much need nuclear in order to do that
09:32 PM vmt: which actually in many senses is the best way to go, however, that does not solve the problem with the grid. nor e.g. cold-start problems in cold climates where the battery internal resistance skyrockets
09:33 PM vmt: not everyone have garages and not everyone live in warm climates.
09:33 PM rue_mohr: actaully you still neeed to touch on the homeless vs vaccant buildings thing
09:36 PM vmt: personally, i don't quite care. i do believe there are homeless people who end up as such purely circumstantially, i don't feel like nearly every homeless person is worth saving.
09:37 PM rue_mohr: sounds like a homeownders oppinion
09:38 PM vmt: if i was in real estate, i would not take people off the street to live in places i own, solely for the reason of them being seemingly a liability in terms of the... condition, state or cleanliness (take a pick) of my property
09:39 PM rue_mohr: arg, I need to unify my fileservers I keep losing things...
09:41 PM vmt: and if i had properties and i'd manage them for a job, i would be completely crazy to endanger the living of myself and people who depend on me solely for the sake of ... charity.
09:42 PM vmt: your example speaks not of a non-crazy world, it speaks of a world in which bending over, waiting to get rammed in the ass is a virtue purely because it's the "right thing to do"
09:43 PM rue_mohr: now who is crazy
09:43 PM vmt: all fun and games in movies and such, but the reality is that this is not how the world works. things are taken for granted and when there are opportunities to exploit, someone will eventually find and use them.
09:44 PM vmt: so hey, if you want to house homeless people at your place - feel free to do so. send pics.
09:45 PM rue_mohr: aha! foo.csv
09:45 PM rue_mohr: damn
09:45 PM rue_mohr: WHY DO I DO THIS TO MYSELF
09:45 PM rue_mohr: YES
09:45 PM rue_mohr: ok
09:46 PM rue_mohr: god, I think finding that file took the longest
09:46 PM rue_mohr: ok this is good
09:46 PM rue_mohr: the cam program still works
09:47 PM rue_mohr: but now uses my 2d and 3d libraries
09:47 PM rue_mohr: just need to pour in my dxf library and it'll be ready to move over to the gui code
09:49 PM vmt: isn't that slightly counter-productive to break your focus from the coding to switch over to irc only to reflect on yourself in writing?
09:50 PM rue_mohr: so is watching netflix while coding
09:50 PM rue_mohr: but its like salad in a burger, it lightens things up
09:50 PM rue_mohr: lettuce
09:50 PM rue_mohr: hu?
09:50 PM rue_mohr: you said salad
09:50 PM rue_mohr: damnit
09:51 PM rue_mohr: TRY HARDER!
09:51 PM rue_mohr: I AM!
09:51 PM rue_mohr: code, I want this drilling dxf holes by bedtime!
09:51 PM rue_mohr: arg, lay off me man!
09:51 PM rue_mohr: codee!
09:52 PM rue_mohr: no! I'm gonna go get a tea, you need to chill out!
09:57 PM rue_mohr: hmm, I bet I know where that error happened
09:58 PM rue_mohr: I was having quite a argument as to if I should be passing all things by pointer or forcing things that should not be modified by a function to be passed by copy
09:58 PM rue_mohr: I suppose the pointers are faster
09:59 PM rue_mohr: it might have not been a much of an error as a unresolved conflict
09:59 PM rue_mohr: that got caught in a power failure and was never resolved
09:59 PM rue_mohr: mkdir v3
10:05 PM rue_mohr: hmm 6 of my libraries, this is gettin up there
10:17 PM nohit: what are you building ?
10:19 PM nohit: did you go back on your old files because of this conversation ?
10:20 PM nohit: trying to prove somthing to yourself (and us) ?
10:20 PM nohit: its not that serious
10:21 PM nohit: i just dont belive in your "magic" coding skills
10:23 PM nohit: i would go so far as to say that your coding skills are probably what basic electronics engineer grad student has, so not much
10:24 PM rue_mohr: I'm writing alinux CAM program
10:24 PM rue_mohr: 2.5D, casue i'v needed one for 20 years now, and I'm tired of waiting for someone else to write it
10:35 PM jesseg: rue_mohr, cool, what kind of CAM program?
10:36 PM jesseg: like for routing PCBs and stuff?
10:37 PM rue_mohr: for converting dxfs to nc files
10:37 PM rue_mohr: you select the dxf objects and say what operations you want to do to them
10:37 PM rue_mohr: starting with hole drilling, as all the cam stuff I ahve now doesn't do that
10:38 PM rue_mohr: its gonna be work, I have to rewrite that clipper library by angus
10:38 PM rue_mohr: its 1 file, 5500 lines
10:38 PM rue_mohr: I roughly sorted it a bit, go it down to 3100 lines :/
10:39 PM rue_mohr: I think that alone will take me about a month, and I fear to think what I might learn/find while doing it
10:41 PM jesseg: lol yeah...
10:41 PM nohit: rue the world is changing and you refuse to accept it, embedded isnt programming 8bit micros with C language anymore. i think that's your major problem
10:42 PM rue_mohr: I'm starting with drilling holes, then I'll do 'engraving', then offset milling, then pocketing
10:42 PM jesseg: CAM takes a better mind then I have. I did some primitive cam to do relief routing from my open source cad project - you draw your traces, and it produces paths that route around - but it was a real struggle :P
10:43 PM rue_mohr: cool tho!
10:43 PM rue_mohr: what did you write it in?
10:43 PM rue_mohr: nohit, I traversed language, rememeber?
10:43 PM jesseg: C with just a touch of C++
10:43 PM rue_mohr: I dont need c++
10:44 PM rue_mohr: I have objects,
10:44 PM jesseg: rue_mohr, here's my project page. http://videoflier.com/gwcad/
10:44 PM rue_mohr: I just lack a little bit of inheritance that would be nice
10:44 PM rue_mohr: objects.content[i].entity.shape.point.x <-- as can be seen here....
10:44 PM rue_mohr: -fms-extensions
10:44 PM rue_mohr: ;)
10:45 PM jesseg: The only thing I understand about (or like about) C++ is the ability to have code and data in a self contained object. I wish C had that one simple aspect without all sorts of abuse to get close.
10:46 PM rue_mohr: that looks like a bunch of descent work
10:46 PM jesseg: oh I'm an awful coder :P
10:46 PM jesseg: and I know it :P
10:47 PM rue_mohr: it the code works, it can be fixed
10:47 PM rue_mohr: (tho it might be painfull)
10:47 PM jesseg: lol it would be painful :P
10:48 PM jesseg: but I've been using it to design simple PCBs, and routing them out on a little 2.5D CNC engraver
10:48 PM rue_mohr: perfect
10:48 PM jesseg: it routes/drills/ and cuts out the board
10:48 PM rue_mohr: lets see under the hood...
10:49 PM jesseg: when you see it's a monolith you won't speak it me ever again :P
10:49 PM rue_mohr: dude, I was just going over the 5500 lines of clipper source...
10:49 PM jesseg: LOL, what is clipper?
10:51 PM rue_mohr: oh its THE polygon clipping librariy that EVERYTHING uses
10:51 PM jesseg: oh that's probably what I should have checked into
10:51 PM rue_mohr: http://www.angusj.com/delphi/clipper.php
10:52 PM jesseg: except I'm not smart enough to understand it :P
10:52 PM jesseg: so I wrote my own half-baked routine for clipping poly's to only draw the part that fits on the screen
10:52 PM rue_mohr: ah geez, there is the start of some code
10:53 PM jesseg: oh what did you see some comments in there? LOL
10:54 PM rue_mohr: oo thats a few globals...
10:54 PM jesseg: yup told ya I'm a lousy coder.
10:55 PM jesseg: globals was my way to have data sets visible to multiple functions
10:55 PM jesseg: without having to have a zillion pointers to pointers pointing to whatnot
10:56 PM rue_mohr: yup
10:56 PM nohit: when everything is on one file the globals dont matter that much
10:56 PM rue_mohr: hey I used to be a dos coder
10:56 PM rue_mohr: we returned local variables
10:56 PM rue_mohr: back then it wasn't evil
10:57 PM rue_mohr: :) so many buffer overrun possabilites!
10:57 PM jesseg: yeah, that's kind of the way C is though
10:58 PM rue_mohr: funny, I'v been circling on making a hash table library
10:59 PM jesseg: oh, did you see my hash table? lol
10:59 PM jesseg: I think it even saves to disk so when you run program later it remembers your settings
11:00 PM rue_mohr: I have a lib for ya
11:00 PM rue_mohr: I call it a magic hat
11:00 PM jesseg: That would break my monolithic stranglehold though :|
11:01 PM rue_mohr: http://paste.debian.net/1051789/
11:01 PM rue_mohr: it was written a logn time ago,
11:01 PM rue_mohr: the magic hat is used when you need unique things
11:02 PM jesseg: like what kind of unique? like long random ID's for authenticating users with?
11:02 PM rue_mohr: nonrandom but yea
11:02 PM rue_mohr: every call it will give you a new number
11:02 PM jesseg: oh like take a number and wait in line :D
11:03 PM rue_mohr: and if you 'return' them, it'll add it back to the values to issue
11:03 PM jesseg: then when a number gets returned to the pool, it's given out again?
11:03 PM rue_mohr: yea
11:03 PM rue_mohr: so all the issued numbers are unique
11:03 PM rue_mohr: tho, I dont know why the empty method is empty...
11:04 PM rue_mohr: huh
11:04 PM jesseg: ok yeah I do that in that cad program. There's a bloody array of item IDs, and if an item gets deleted, it's slot gets marked empty, and its number will be returned on the next "get next ID" or whatever -- otherwise, a new one is added to the end
11:04 PM rue_mohr: yea, I saw
11:05 PM jesseg: I'm sure you can tell, but this was the first program I ever really used malloc and friends in :P
11:07 PM rue_mohr: http://paste.debian.net/1051791/
11:07 PM rue_mohr: my understanding is that if the area comes out negitive, its wound the other way
11:07 PM rue_mohr: #define AUL(A,B) (((A.y + B.y)/2.0) * ( B.x - A.x))
11:07 PM rue_mohr: hehe
11:09 PM rue_mohr: omg you did your own gui
11:09 PM jesseg: yeah....
11:10 PM rue_mohr: I was borderline
11:10 PM rue_mohr: I'm using motif,
11:10 PM rue_mohr: which is bad
11:10 PM rue_mohr: tho, no offence, it looks a tad better than yours :D
11:10 PM jesseg: no offense taken. what you say is true.
11:11 PM rue_mohr: this is awesome work tho
11:12 PM jesseg: This is designed specifically for my needs, to be fast and convenient and waste as little time using the interface to allow more time designing things. As you can see if you watched the video, each menu item has a keystroke and you can type letters instead of clicking the menus -- so AARF is Add Arc Right-hand, center First.
11:12 PM rue_mohr: :) I wrote a basic regex library if you want to use it later
11:12 PM rue_mohr: BUT, you now know what would be needed to remake it better
11:14 PM jesseg: what's that?
11:14 PM rue_mohr: in lots of ways what I'm writing is simpler, cause I dont handle drawing the objects, they come in via dxf
11:14 PM jesseg: gotcha
11:15 PM rue_mohr: hahahah istouching_OLD_UNUSED(doub .... :)))))
11:15 PM jesseg: lol uh huh..
11:15 PM rue_mohr: man all the old code I could find of mine that has stuff like that
11:16 PM jesseg: my relief routing code is kind of crude.. but essentially works. But at least I made the final pass to export cuts in an order so that they were sorted so the quill didn't have to spend as much time not cutting
11:17 PM nohit: its great that you made a tool for yourself and it works, but that source code is crazy. i dont know why you made the design choice to put everything in one file
11:17 PM jesseg: yeah I don't know either
11:17 PM rue_mohr: most of the code I have done is gui junk
11:17 PM jesseg: I've thought about splitting it out into multiple files
11:17 PM rue_mohr: its something you learn
11:17 PM rue_mohr: like writing fn's that are no longer than a screen
11:18 PM rue_mohr: and "not" using globals
11:18 PM rue_mohr: I gained a lot when I started passing structs and developed a universal return value system
11:19 PM jesseg: yeah I'm not a programmer, I'm a problem solver, and I'm working within my mental limits, not anyone elses :D so if a global happens to be how I think best solves the problem, then by George I'm gonna do it :P
11:19 PM rue_mohr: I think this code is where I was about '95 or so
11:19 PM jesseg: and my brain needs things to be simple and logical or it doesn't work LOL
11:20 PM rue_mohr: crazy amounts of work, minor bugs that wont track down and ya dont always care, works if you use it for the purpose it was created for
11:20 PM jesseg: yup
11:21 PM rue_mohr: oh hello main...
11:23 PM jesseg: I *would* like to separate it into separate files.. but so busy, if it works as is I don't feel that motivated :P
11:23 PM rue_mohr: I didn't notice your 2d library functions
11:24 PM rue_mohr: jesseg, I cant remember how I successfully got projects out of the state this one is in
11:25 PM jesseg: rue_mohr, might be a lost cause, eh?
11:25 PM rue_mohr: I think the way is to start building and testing the libraries you know you need for it
11:26 PM rue_mohr: things like 2d trig, screen mapping, object operations
11:26 PM jesseg: what kind of libraries? like ones I write? or other people's?
11:26 PM rue_mohr: gui
11:26 PM rue_mohr: you choose
11:26 PM rue_mohr: I usually find it takes longer to learn and debug other peoples libraries than to write my own
11:27 PM jesseg: yeah I'm apposed to using other libraries because I've been so tormented by trying to compile a program when it's got a 1300 library dependency tree and finally one of them refuses to compile because of an incompatibility with gcc or some core system library i have :P
11:27 PM rue_mohr: oh yea, that too
11:28 PM rue_mohr: nothing like finding out "simple fast math library" depends on perl
11:28 PM jesseg: I'm already outside my comfort level using Allegro... but I didn't feel up to doing my own accelerated graphics drawing routines :P
11:28 PM jesseg: and at the time I started I thought it would be cool to support multiple platforms
11:28 PM rue_mohr: motif has been amazing
11:29 PM rue_mohr: all the examples, most from '98 work
11:29 PM jesseg: now that I've been out of windows and on linux only for so long I wish I'd just got with xlib or something :P
11:29 PM jesseg: but with allegro it compiles for windows/linux/mac (and presumably android)
11:30 PM rue_mohr: basically EVERY motif example I'v seen works, less the changes they made to gcc (main need to be an int, and stdio, etc aren't default included)
11:30 PM rue_mohr: athena does not work
11:30 PM rue_mohr: gtk is c++ min. (which is passable)
11:31 PM rue_mohr: qt is a horrid thing to be avoided at all cost
11:31 PM jesseg: Ultimately I'm thinking of going to SDL since it's standard installed on most Linux distros and has much less dependencies than Allegro, however I'd have to write my own geometric rendering routines
11:32 PM rue_mohr: in motif I'm using a drawing object for the graphics
11:33 PM rue_mohr: less the libraries, this is mine so far
11:33 PM rue_mohr: http://paste.debian.net/1051793/
11:33 PM jesseg: *looks at screenshots of motif apps* oh yeah, I've seen programs using motif before. It did feel a little clunky, but was certainly functional
11:33 PM rue_mohr: you can notice most of it is gui setup
11:33 PM nohit: wxwidgets ?
11:33 PM nohit: sdl ?
11:33 PM nohit: sfml ?
11:33 PM nohit: you know about those rue ?
11:33 PM rue_mohr: my program is C
11:33 PM rue_mohr: which limits me quite a bit
11:34 PM rue_mohr: sdl is not a widget set
11:34 PM jesseg: yeah I make my own widgets :P
11:34 PM nohit: its a cross platform media/gui lib like the rest of them
11:34 PM rue_mohr: I cant recall the problem with wx
11:34 PM rue_mohr: no, I do not want cross platform
11:34 PM rue_mohr: this will be linux only
11:34 PM jesseg: gives my full control of them and full integration with the style of user interface
11:34 PM rue_mohr: those @#$%#$%^@#% windows users can go to hell
11:35 PM jesseg: about how I feel now
11:35 PM rue_mohr: jesseg, yes, I commend you for your own gui there
11:35 PM rue_mohr: I couldn't push myself into that one
11:35 PM jesseg: I probably shouldn't have pushed myself into that one :P
11:35 PM rue_mohr: tho I might do my own widget set on Xt
11:35 PM jesseg: but I find it a lot easier to write most things myself than to try and figure out how to use someone else's library
11:36 PM rue_mohr: when I first had the idea to make this, is was more like what you ahve, but no generic nc files and made from qbasic, not C
11:36 PM nohit: good engineer makes his software crossplatform, if possible
11:36 PM rue_mohr: F that
11:36 PM rue_mohr: pay for your windows software or use linux :P
11:37 PM rue_mohr: http://paste.debian.net/1051793/ << jesseg my program so far there, see the draw()?
11:37 PM nohit: maybe that's one of the reasons you are an electrician, not an (good) engineer
11:38 PM rue_mohr: void regenDisplay ( void )
11:38 PM rue_mohr: jesseg, ?
11:38 PM jesseg: rue_mohr, I don't see a draw()
11:38 PM rue_mohr: the program is still reasonably close to the metal
11:38 PM rue_mohr: void regenDisplay ( void )
11:39 PM rue_mohr: I render it all to a pixmap and let X blit it
11:39 PM jesseg: cool
11:40 PM rue_mohr: I'm not doing click-on-object selection yet tho
11:40 PM rue_mohr: thats a subgoal
11:40 PM jesseg: I think Allegro sends it to the opengl accelerated 2D renderer
11:40 PM rue_mohr: mhm, for now, I'm using X calls so i dont ahve to define how to draw a circle
11:41 PM rue_mohr: opengl cant draw a circle
11:41 PM rue_mohr: just lines
11:41 PM jesseg: in fact I know that to be the case. All my objects are converted to polygons and sent to opengl
11:41 PM rue_mohr: and the fact it cant draw a rotated slliptical arc is not an issue
11:41 PM day__ is now known as day
11:41 PM rue_mohr: elliptical
11:42 PM rue_mohr: I nee to build a proper keybaord
11:42 PM rue_mohr: or pay the $1000
11:48 PM nohit: jesseg start by structuring the project to sub modules and create .c/.h pairs for them, and move code from main little by little. or re-write the whole thing with OO language
11:49 PM jesseg: nohit, yeah that's kind of what I want to do. What OO language did you have in mind? :D
11:50 PM rue_mohr: want my non-oo 2d library?
11:50 PM nohit: and maybe create some sort of abstraction layer for the allegro, so you can change the lib and it wont affect your application code in any way
11:50 PM rue_mohr: it comes with tech support
11:50 PM rue_mohr: :)
11:50 PM jesseg: I kind of like C. As a matter of fact I really like C. I'm like a drunk with worn out clothes that goes to the same bar every night. His friends all thinks he stinks but he just keeps doing it because he likes it. I like C LOL
11:50 PM nohit: so your apllication code doesnt make direct calls to allegro
11:50 PM rue_mohr: and I have a matrix-addon library
11:51 PM jesseg: rue_mohr, what does your non-oo 2d library do? is it a rendering library, or a nc conversion export library?
11:51 PM rue_mohr: and maybe you could help develop my polygon library
11:51 PM rue_mohr: its not had much time in on it
11:52 PM rue_mohr: I'm working on my nc conversion library
11:52 PM nohit: jesseg c++
11:52 PM rue_mohr: right now, its called main.c :D
11:52 PM rue_mohr: http://paste.debian.net/1051797/
11:52 PM rue_mohr: thats it
11:53 PM nohit: but if you like C, then just clean the project up
11:53 PM rue_mohr: its gonna change a lot
11:53 PM jesseg: I'd be glad to help on your polygon library but I really don't have the mental capacity LOL. It was all I could do to just clip a polygon to a rectangular screen area LOL..
11:53 PM rue_mohr: I'm gonna convert clipper
11:53 PM rue_mohr: its got a LOT of good stuff
11:53 PM rue_mohr: like, generically
11:54 PM rue_mohr: the 2d library is just that, 2d stuff
11:54 PM rue_mohr: defines a point, transforms, and things like intersectons and other geometry stuff
11:55 PM rue_mohr: 1 mi, I'll just post it
11:55 PM jesseg: nohit, The only part of C++ that I like is the simple ability to have a "structure" (do they call it a class?) which has data and code in the same object. I find that very powerful and yet still very simple. In fact I thought about starting a new language called C+ which would be C with simple class support, or more specifically structs that supported embedded functions..
11:56 PM rue_mohr: http://ruemohr.org/~ircjunk/programming/c/2d2.c
11:56 PM rue_mohr: http://ruemohr.org/~ircjunk/programming/c/2d2.h