#garfield Logs
Feb 09 2021
#garfield Calendar
12:03 AM rue_mohr: ok! x scrolling is working!
12:18 AM rue_mohr: oh my, its going to start getting hard to bring in my libraries one at a time
12:19 AM rue_mohr: The cursor works wrong here
12:19 AM rue_mohr: it SHOULD be a ...
12:19 AM rue_mohr: no...
12:20 AM rue_mohr: hmm i was going to say it should be a pointer to the file content buffer
12:20 AM rue_mohr: but one of my things is that you can position the cursor anywhere, it does not have to be within the length of a line of the bounds of the end of the file.
12:20 AM rue_mohr: hmm
12:21 AM rue_mohr: which means there is some figuring out to do if the user inserts a character
02:00 AM rue_mohr: save:
02:00 AM rue_mohr: - erase document from memory
02:00 AM rue_mohr: - save memory to file
02:01 AM rue_mohr: hahahahahaha
06:54 AM polprog: hey, its probably tempest proof
06:54 AM polprog: this way :)
12:46 PM rue_mohr: hmm
02:24 PM rue_mohr: polprog, which pcb program is that?
02:25 PM polprog: kicad
02:26 PM polprog: 5.1.5
02:31 PM Tom_L: so the editor is done?
02:32 PM rue_mohr: nope
02:33 PM rue_mohr: I'm working on backspace
02:33 PM rue_mohr: delete is a natural enough thing, but backspace has a whole whack of reprocussions on the cursor position
02:34 PM rue_mohr: I have an interesting snag
02:35 PM rue_mohr: the old library I wrote assumes the cursor is always within the content of the file
02:35 PM rue_mohr: however, the editor places the file content in a 2d space that you can fully navigate, even if there is no file content for it
02:36 PM polprog: so i can like.. put a cursor behind EOL?
02:36 PM polprog: or behind EOF?
02:36 PM polprog: and if i type it will fill it up?
02:38 PM rue_mohr: no
02:38 PM rue_mohr: say you have a file with a list of 4 digit numbers
02:39 PM rue_mohr: in my editor, you can place the cursor anywhere on the screen, aka beyond the 4th character
02:39 PM polprog: yeah thats what i mean
02:39 PM polprog: maiframe style
02:39 PM rue_mohr: so my cursor can be at 15,10
02:39 PM rue_mohr: if I type something, if auto-pads the file to suit
02:40 PM polprog: yeah exactly
02:40 PM polprog: neat
02:40 PM rue_mohr: but it creates a mapping futz
02:40 PM rue_mohr: if I'm off the content, and hit delete, things have to get figured out
02:41 PM rue_mohr: my library tracks things with pointers to the content
02:41 PM rue_mohr: "bookmarks"
02:41 PM rue_mohr: tracks things like CURSOR POSITION :S
02:41 PM polprog: doesnt make sense to delet something that is not there
02:42 PM Tom_L: so many things to keep track of
02:42 PM polprog: so id just beep at the user violently
02:42 PM rue_mohr: so, I have a problem now, the cursor could be outside the content
02:42 PM rue_mohr: right now I try to silently ignore the request
02:42 PM Tom_L: left one, right one, up a line, down a line....
02:42 PM rue_mohr: but there are two artifacts that have come up due to it
02:43 PM Tom_L: and if it was at the end of the line and you go up a line and the line is shorter what do you do?
02:43 PM rue_mohr: I just go up
02:43 PM rue_mohr: it doesn't matter if there is content there or not
02:43 PM Tom_L: it should
02:43 PM rue_mohr: you can add it there if you want, it will auto-pad the line
02:43 PM Tom_L: that's more like a hex editor
02:44 PM rue_mohr: I really love it
02:44 PM rue_mohr: its just good that I dont have to take in 1Mchars/sec
02:45 PM rue_mohr: the weight of the code would start to show
02:47 PM rue_mohr: oooh
02:47 PM rue_mohr: SSN
02:47 PM rue_mohr: ^
02:47 PM rue_mohr: no its when
02:47 PM rue_mohr: SSN
02:47 PM rue_mohr: ^
02:47 PM rue_mohr: if the cursor is there, and I hit backspace, it deletes the \n for the line I'm on
02:48 PM rue_mohr: which seems all wrong
03:01 PM Tom_L: not all your pointers followed?
03:13 PM rue_mohr: :)
03:13 PM rue_mohr: its funny how much code there is to make things look right to the user
03:51 PM polprog: :)
03:51 PM polprog: finished laying out a board
04:29 PM rue_mohr: your going to get it done?
04:29 PM rue_mohr: perfect purple?
04:30 PM rue_mohr: oh your not in the usa
04:30 PM rue_mohr: where are you again... my memory says norway but I'm sure thats not right
04:55 PM polprog: poland
04:55 PM polprog: nah i have a board fab near here
04:55 PM polprog: they are not the best but they are fast and cheap
04:58 PM rue_mohr: ooo who?
05:02 PM polprog: https://www.fabrykapcb.pl/
05:02 PM polprog: ancient site, but the person who does email there was pretty helpful when i didnt know the ropes yet
05:03 PM polprog: https://translate.google.com/translate?sl=pl&tl=en&u=https://www.fabrykapcb.pl/
05:05 PM rue_mohr: square decimeters!?
05:05 PM polprog: we're metric over here :P
05:05 PM rue_mohr: deci was only supposed to be a technicallity tho
05:05 PM rue_mohr: thoguht everyone went to cm or mm
05:06 PM polprog: dm2 is a pretty imaginable unit
05:06 PM rue_mohr: ah gallery, ok, that didn't stand out
05:06 PM polprog: i mean, a PCB is gonna be several dm2 in area so you can work it out in your head
05:07 PM rue_mohr: yes, its just I'v never seen anyone use dm
05:07 PM polprog: hmm, youre right
05:07 PM polprog: i dont think ive seen it often either
05:08 PM polprog: fun fact, when you buy produce per weight here you express it in decagrams, 1/100 kg
05:08 PM polprog: im not sure why
05:08 PM polprog: it's... a thing
05:08 PM rue_mohr: lots of different baord grades
05:09 PM polprog: yeah
05:09 PM rue_mohr: calculator, connect, gallery, ? certifications, ? contact
05:09 PM polprog: huh?
05:09 PM rue_mohr: its kinda handy that english stole so much from so many other languages
05:09 PM polprog: the translate version looks okay :P
05:10 PM polprog: i linked it moment later
05:10 PM polprog: its the other way around, half the jargon here is english loanwords
05:11 PM polprog: oh haha google makes some hilarious mistakes
05:12 PM rue_mohr: :)
05:12 PM polprog: im pretty sure this is a one person company, or a very small one
05:12 PM polprog: but their prices are amazing
05:13 PM rue_mohr: NOWOŚĆ
05:13 PM rue_mohr: Wykonujemy obwody na laminatach o podłożu Al (aluminiowym) o gr. 1,5 mm !
05:13 PM rue_mohr: laminated on aluminum?
05:13 PM polprog: no, this means aliminum PCB
05:13 PM rue_mohr: laminatach <-- pcb?
05:13 PM polprog: laminate
05:13 PM rue_mohr: :/
05:13 PM polprog: which is a common name for the material
05:14 PM rue_mohr: ok then..
05:14 PM polprog: PCB = płytka / płytka drukowana
05:14 PM rue_mohr: hmm
05:14 PM polprog: "We manufacture circuits on aluminum laminate, thickness 1.5mm"
05:14 PM rue_mohr: yea ok
05:15 PM polprog: i wanted to order a test run of 10 pcbs, approx 1" x 1.5" double sided nothing special in a different, bigger company
05:16 PM polprog: one that i ordered from when i was an intern two years ago at another firm
05:16 PM polprog: they quoted me $300
05:16 PM polprog: :p
05:16 PM rue_mohr: k
05:16 PM polprog: here i can get the same stuff in 1.5 weeks for < $20
05:16 PM rue_mohr: I calculated that doing my own is 10c/cm^2
05:16 PM polprog: yeah, in material cost
05:16 PM rue_mohr: yep
05:17 PM rue_mohr: but I'm limited
05:17 PM rue_mohr: so~
05:17 PM polprog: maybe if i had a shed with everything ready id be running my own boards too
05:17 PM rue_mohr: :)
05:17 PM rue_mohr: they do vias, which is nice
05:17 PM polprog: yep, and mask and silkscreen
05:20 PM rue_mohr: I can do a printed silkscreen
05:20 PM polprog: oshpark is nice, but the shipping to europe is insane
05:21 PM * rue_mohr nods
05:21 PM polprog: id probably use then if/when i need a flex PCB
05:21 PM polprog: because i doubt anyone here could make it cheaper (well, the people from Gdansk can but they have insane prices too)
05:22 PM polprog: it's just that they dont have a process for short runs
05:22 PM polprog: i was in that factory, they have optimized for large runs
05:23 PM polprog: they keep the film prints in an archive, you pay $80 once per project to get the transparencies developed
05:23 PM polprog: i dont need that
05:24 PM polprog: so ive moved the rack under the desk, its getting less messy here
05:24 PM polprog: i finished the latest PCB
05:24 PM polprog: that along with another one ill probably send to that guy i linked
05:24 PM polprog: get them done, maybe just before the break ends and then ill have a week to play with them
05:25 PM polprog: maybe tomorrow ill try to send / capture a LoRa packet
05:25 PM polprog: ive got two USB receivers which can supposedly do monitor mode, and i have to make up an antenna for the module
05:26 PM polprog: i have the register read/write function ready and working... all i have to do now is to find out which registers to fill in to transmit and receive packets
05:27 PM polprog: That guy makes really pretty boards, the silkscreen is sometimes off a bit
05:27 PM polprog: but that's not that important
10:07 PM Tom_L: ever try china boardhouses?
10:07 PM Tom_L: polprog,
10:08 PM Tom_L: i've used a couple. one guy isn't doing it now but the other was goldphoenix iirc
10:08 PM Tom_L: oshpark... i remember when he started i ordered some from him
10:08 PM Tom_L: laean is the guy iirc
10:09 PM rue_mohr: I need to do a trainer excersize and get a board mae
10:09 PM rue_mohr: made
10:09 PM rue_mohr: I did a pre-made oshpark board
10:09 PM rue_mohr: so ordering from them is worked out
10:09 PM rue_mohr: I just need to be abel to submit a design
10:10 PM Tom_L: i think i sent him the 5? maybe 6 set standard ones
10:10 PM Tom_L: top, bottom copper, top bottom silk, outline and drill file
10:11 PM Tom_L: top bottom solder mask
10:11 PM rue_mohr: I tried with eagle
10:11 PM Tom_L: a couple of those may be combined, i forget
10:11 PM rue_mohr: the design was rejected, I couldn't get it solved
10:12 PM Tom_L: 7 in all
10:12 PM Tom_L: he had tighter tolerance on the traces iirc
10:13 PM Tom_L: i always sent a txt file with the layer file descriptions1
10:14 PM Tom_L: · 2 layer board - 0.062" FR4 material
10:14 PM Tom_L: · 8mil spacing minimum
10:14 PM Tom_L: · 8mil traces minimum
10:14 PM Tom_L: · 20mil minimum drill size
10:14 PM Tom_L: · 500mil maximum drill size
10:14 PM Tom_L: · No internal routes, no v-scoring
10:14 PM Tom_L: · Board is routed to the indicated border (very clean edges, you can get creative with the shape as well!)
10:14 PM Tom_L: · Soldermask both sides
10:14 PM Tom_L: · Silkscreen both sides
10:14 PM Tom_L: · 1oz Copper
10:14 PM Tom_L: · No limit on the number of vias
10:14 PM Tom_L: · No limit on pads or components
10:14 PM Tom_L: · Multiple designs, multiple copies are allowed!
10:14 PM Tom_L: · Any size up to 10x15", measured in inch increments
10:14 PM Tom_L: · Minimum billable size 1x1" (smaller boards are allowed but rounded up)
10:14 PM Tom_L: Your design can be any size - board size is rounded up to the nearest inch
10:14 PM Tom_L: · Top Copper Layer (cmp or gtl)
10:14 PM Tom_L: · Top Solder Mask (stc or gts)
10:14 PM Tom_L: · Top Silkscreen (plc or gto)
10:14 PM Tom_L: · Bottom Copper Layer (sol or gbl)
10:14 PM Tom_L: · Bottom Solder Mask (sts or gbs)
10:14 PM Tom_L: · Bottom Silkscreen (pls or gbo)
10:15 PM Tom_L: · Drill File (drd or txt)
10:15 PM Tom_L: cmp stc plc sol sts pls drd is what i sent iirc
10:15 PM rue_mohr: I was pretty dissapointed when they wouldn't take the one processed with the script
10:15 PM rue_mohr: I think it was the second time I'd tried too
10:15 PM Tom_L: and used a verifier program before i sent them
10:16 PM Tom_L: i forget the name of it
10:16 PM rue_mohr: not for linux is it?
10:16 PM Tom_L: gc-preview
10:16 PM Tom_L: it's free
10:16 PM Tom_L: i dunno if they have a linux version or not
10:16 PM Tom_L: but i used that all the time with eagle files
10:17 PM Tom_L: if it ain't right there, it ain't right
10:18 PM Tom_L: https://www.graphicode.com/GC-Prevue_Gerber_Viewer
10:19 PM rue_mohr: I'm not too into trying eagle again
10:19 PM Tom_L: i'd have to relearn it
10:19 PM rue_mohr: I'd like to move along, I think kicad is the new-free one
10:19 PM Tom_L: i was pretty good at it
10:20 PM Tom_L: i kept it because i had unlimited area and 16 layers
10:20 PM Tom_L: if needed
10:21 PM Tom_L: https://www.eevblog.com/forum/eda/gc-prevue-not-free-any-more-need-basic-gerber-viewer/
10:21 PM Tom_L: maybe gc-preview isn't free anymore
10:21 PM rue_mohr: huh
10:21 PM rue_mohr: this is why open source is nice
10:25 PM Tom_L: i have like 2-3 design rule files for various board houses
10:25 PM Tom_L: if it passes them, most likely it's good
10:27 PM Tom_L: batchpcb, goldphoenix, itead, laen (oshpark), seeedstudio
10:27 PM Tom_L: each one was slightly different on their rules
10:27 PM rue_mohr: and the two I tried would not help at all to even tell me what problem they encounterd
10:28 PM Tom_L: they highlite the error
10:28 PM Tom_L: when you run drc
10:28 PM rue_mohr: no they didn't help me a bit
10:28 PM Tom_L: you run both erc and drc
10:28 PM rue_mohr: both times I just got told the files were not right and they would not say anything else
10:28 PM Tom_L: electrical rule check and design..
10:28 PM rue_mohr: it was really frustrating
10:29 PM Tom_L: oh and 2 for olimex
10:29 PM rue_mohr: I did everything super carefully exactly like the instructions for that site
10:29 PM Tom_L: one 8 mil and one 10 mil
10:29 PM rue_mohr: both times it was from eagle tho
10:29 PM rue_mohr: wow I'm super dizzy
10:29 PM Tom_L: only time i ever ordered from laen was before he had the site and i emailed him directly
10:29 PM rue_mohr: I hate this
10:30 PM Tom_L: back when purple was brown :)
10:30 PM rue_mohr: I should make another thing up and forward it to you
10:30 PM rue_mohr: tell me if it looks right
10:30 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/boards/atmega32u4/atmega32U4_3.jpg
10:31 PM Tom_L: i haven't used eagle in a very long time
10:31 PM Tom_L: i'd have to remember alot of it
10:32 PM Tom_L: but i'm using 4.16
10:32 PM Tom_L: nothing newer
10:32 PM rue_mohr: its dead now eh?
10:32 PM Tom_L: it still works here
10:32 PM rue_mohr: they snowballed it into something, then something else
10:32 PM Tom_L: acad owns it now
10:32 PM Tom_L: but yes
10:32 PM rue_mohr: yea
10:32 PM Tom_L: it traded hands a couple times
10:33 PM Tom_L: that version worked perfectly fine for me
10:33 PM rue_mohr: I cant think like this
10:33 PM Tom_L: you're welcome to it and or the design rule files
10:33 PM rue_mohr: arg
10:35 PM Tom_L: with the commercial license
10:35 PM rue_mohr: what do I have on here
10:35 PM Tom_L: how would i know?
10:36 PM rue_mohr: I have 6.6.0
10:36 PM rue_mohr: "light edition"
10:36 PM Tom_L: i have a copy of 6.2.0
10:36 PM Tom_L: unlicensed
10:37 PM Tom_L: back when i'd look at files for ppl
10:37 PM Tom_L: but i always did min in 4.16
10:37 PM Tom_L: they added some libs and a few features that didn't excite me much
10:37 PM rue_mohr: yea, it got all screwball
10:37 PM Tom_L: but it's easy enough to make your own parts
10:38 PM Tom_L: one of the part suppliers had it for a while and encorporated their product line into it
10:38 PM Tom_L: then acad got it
10:38 PM rue_mohr: I think kicad improved a lot really fast when eagle went non-free
10:39 PM Tom_L: i think when software reaches a point they should stop trying to improve it because it just gets worse
10:39 PM rue_mohr: yea, man excell hit that in 2000
10:40 PM rue_mohr: or was '97 the good version
10:40 PM Tom_L: i dunno, i got 2 versions installed
10:40 PM rue_mohr: anyhow the development got directed by people who obviously never used it
10:40 PM Tom_L: one is 2000 the other is 2013? i think
10:41 PM rue_mohr: I thik I know how to fix the backspace problem
10:42 PM Tom_L: do you treat the file as lines of txt or a flat file?
10:42 PM rue_mohr: flat file right now
10:42 PM rue_mohr: but there is a bunch of jazz when you hit backspace
10:43 PM Tom_L: backspace removes a character
10:43 PM rue_mohr: you ahve to delete "the other way" but if that way happens to be a linefeed it all goes to hell
10:43 PM rue_mohr: "delete" is easy
10:43 PM Tom_L: it should go to the previous line at the end of the line
10:44 PM rue_mohr: :)
10:44 PM Tom_L: unless you treat it as a per line edit
10:44 PM rue_mohr: its a flat file
10:44 PM rue_mohr: but I have to map the cursor each time, becuause the cursor may not be in scope of the file
10:44 PM Tom_L: yeah notepad++ does that
10:44 PM Tom_L: goes to the end of the previous line
10:45 PM rue_mohr: oh damnit
10:45 PM Tom_L: https://github.com/notepad-plus-plus/notepad-plus-plus
10:45 PM rue_mohr: my idea doesn't work
10:46 PM rue_mohr: I have a issue wher the condition I need to detect isn't available int eh functions that need to do so mething about it
10:46 PM rue_mohr: oh man headache
10:47 PM rue_mohr: the function to delete a character always deletes the character to the right of the cursor
10:47 PM rue_mohr: aka "delete key"
10:47 PM Tom_L: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/src/Position.h
10:48 PM rue_mohr: so, to backspace, I adjust the position of the cursor
10:48 PM rue_mohr: which isn't just that easy
10:48 PM rue_mohr: becasue the cursor may not be within the file content
10:48 PM Tom_L: the cursor should be within the screen content
10:48 PM Tom_L: not file
10:48 PM rue_mohr: so you have to work out where the cursor would be if it were in the previous content of the file
10:48 PM rue_mohr: yea
10:49 PM rue_mohr: mapping between them is where the bugs are happening
10:52 PM Tom_L: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/src/PositionCache.h
10:52 PM Tom_L: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/src/PositionCache.cxx
10:52 PM Tom_L: what is .cxx?
10:52 PM rue_mohr: I'm haivng a bit of a time becasue my cursor is a hilighted character, and I cant mentally keep track if the effective position is on the left of right edge
10:52 PM rue_mohr: and I'm sizzy as hell
10:52 PM Tom_L: see how they handle it. i know the code is different but might give you an idea
10:52 PM rue_mohr: c++ is such a dynamic language that I'm sure they changed the extension to try to keep track of what variant it is
10:52 PM rue_mohr: I just have to pass 1 condition
10:52 PM rue_mohr: between two functions
10:52 PM rue_mohr: that are both void
10:53 PM rue_mohr: the "adjust position" function knows the delete should be aborted
10:53 PM rue_mohr: it cant tell the function that called it
10:53 PM rue_mohr: which then does the delete anyhow
10:53 PM Tom_L: why not?
10:54 PM rue_mohr: beause there is no return value