#avr Logs

Apr 03 2017

#avr Calendar

12:23 AM daey_ is now known as daey
04:24 AM JanC_ is now known as JanC
04:40 AM skz81: <polprog> thanks. ive learned so much in this channel / <polprog> wrong channel << LOL
05:04 AM polprog: nah, it was another message that was wrong ;)
06:33 AM Lambda_Aurigae: dangit..have we been helpful again?
06:33 AM Lambda_Aurigae: We gotta put a stop to that..makes us look bad compared to #electronics
06:35 AM Emil: Lambda_Aurigae: dont even mention that cesspool
06:36 AM Lambda_Aurigae: it's almost as fun there as #stm32
06:36 AM Emil: I recently talked at ##stm32
06:36 AM Emil: I dont know what I expected
06:40 AM Lambda_Aurigae: did you mention linux or open source or freeware?
06:41 AM Emil: linux and open source
06:41 AM Emil: The trouble-double
06:41 AM Emil: The cognitive dissonance on that channel is _absolutely unreal_
07:06 AM polprog: i remember i got help in #electronics once in 15 tries or so. it was a year ago
07:08 AM dunz0r: I've never gotten help in electronics ever, even though I've only asked proper questions. That channel sucks.
07:13 AM polprog: its just a "circle of self-adoration" as we call it in polish ;)
07:21 AM hetii: Hello :)
07:24 AM hetii: I use switch parallel with triac to switch lamp. I also try to detect if my lamp is on by switch or triac thats why I off my triac on 20ms and check if the pin state on optocoupler is high or low. my issue is in that my lamp blink over this test and when I reduce this 20ms period then i`m not able to see changes on that pin.
07:25 AM hetii: so woneder if something is wrong or my design or just its not possible to switch triac on/off enough fast to capture pin changes without blinking of lamp.
07:29 AM skz81: <polprog> its just a "circle of self-adoration" as we call it in polish ;) >> a "circle jerk"... ^^
07:30 AM Emil: rinkirunkkaus
07:34 AM skz81: Emil, what langage is that ? "rink" means circle I bet ?
07:36 AM skz81: langUage even (i always make the confusion between french and english spelling... Same word in both, except that damn 'U' )
07:59 AM yids_ is now known as yids
08:46 AM Emil: skz81: kylhä sie pittäissi tiettää
08:47 AM Emil: siu*
08:49 AM skz81: Emil : I was not sure anymore... By the way, google traductions detects finnish, but fails to translate AS IS.
08:51 AM skz81: Some suggestion unveiled "should know", I infer "siu" to means "you"... What is kylhä ?
08:52 AM Emil: skz81: should have used moar dialect
08:52 AM skz81: ^^
08:53 AM Emil: but yeah rinki is ring/circle and runkkaus means to jack off / jerk
08:53 AM Emil: The propee way to write that sentence would be
08:53 AM Emil: Kyllä sinun pitäisi tietää
08:55 AM skz81: heyhey... ok, thx :)
08:56 AM Emil: ;)
08:56 AM Emil: skz81: where were you from?
08:58 AM skz81: France. Living in the south nowadays... But I come from N-W... so i'm nearly a british person :p
09:04 AM Emil: haha :D
09:04 AM Emil: skz81: also translation* ;)
09:04 AM Emil: not transduction
09:05 AM skz81: Emil, yup I noticed... I secretfully hoped no one else would :p
09:06 AM Emil: I didnt even pay attention until we started talking about language :D
09:07 AM skz81: Anyway, I bet I used far less french in my english sentences than the opposite, sadly...
09:08 AM Emil: yeah
09:08 AM Emil: I do the same
09:08 AM Emil: it id _wrong_
09:08 AM skz81: finallty it is not a bad thing to have a native language that has nothing (or very little) to do with english. I see english words taking over common language every day...
09:09 AM Emil: Same :/
09:09 AM skz81: sad... sick world !
09:09 AM Emil: It is especially prelevant in Finnish
09:09 AM Emil: even when there are good words for it, we use the anglism/direct fucking english
09:10 AM Emil: I have started to inject a little Finnish into my discussions on English forums as a small fight against the windmills
09:10 AM Emil: and I mean
09:11 AM Emil: It's good that we are good at English but hot damn why do we have to replace other languages!?
09:13 AM Emil: If I ever became a world dictor I would mandate that Finnish be the official language of the world but every national language should be enforced to the max and people of the same language should speak the same native language instead of Finnish
09:13 AM Emil: It's not even rational! And I'm a rational person
09:17 AM dunz0r: I do my best to use swedish words instead of english ones, where it's appliciable.
09:18 AM dunz0r: I'm not going to say "stigfinnare" instead of router though, no one will understand me.
09:21 AM Emil: dunz0r: wtf
09:22 AM Emil: is that a "pioneer" directly translated?
09:22 AM Emil: dunz0r: inst that a brandname?
09:23 AM Emil: No one should translate brandnames
09:24 AM dunz0r: Emil: No, pioneer would be pionjär. Router as what tells your computer where to go, "stig"(path), "finnare"(finder).
09:24 AM Emil: ah, interesting
09:25 AM Emil: reititin is easy for us
09:25 AM Emil: it routes, se reitittää
09:25 AM Emil: and reitti is a finnish word
09:45 AM polprog: i guess i wont ask you about przelotki then ;)
09:57 AM skz81: Hum, my words were more about situations where the english and native language words are very close from each other...
09:58 AM skz81: Recently I was wondering about "acceptance crieria". In my office, nearly every one translate it as "critères d'acceptance" in french, but the word "acceptance" does not exist in french (with this meaning).
09:59 AM skz81: -- BTW, It denotes the quantitative capacity of a particule detector to "accept" particules --
10:00 AM skz81: The correct french word is "acceptation", but it seems it's gonna die soon
10:01 AM Emil: polprog: me?
10:23 AM Emil: I wonder what the fuck DO was doing just moments ago
10:24 AM LeoNerd: Network adjustments?
10:24 AM LeoNerd: They keep emailing me about that
10:24 AM Emil: LeoNerd: no, that's scheduled for later today
10:25 AM Emil_: Fucking kidding me
10:25 AM Emil_: I was about to say that "unless they went "hey let's do it now""
10:25 AM Emil_: but apprently I spoke too soon
10:27 AM Emil_: LeoNerd: do you have access still?
10:27 AM Emil_: Suddenly I'm super fucking glad I took a full backup yesterday
10:27 AM Emil_: Fucking hell
10:28 AM LeoNerd: Since I'm working here... seems fine
10:28 AM Emil_: LeoNerd: what datacenter?
10:29 AM LeoNerd: AMS I *think*
10:29 AM LeoNerd: Ahyes, AMS2
10:30 AM Emil_: Hmm, mine's on frankfrurt
10:30 AM Emil_: furt*
10:30 AM Emil_: God damn that's stupid
10:30 AM Emil: Well, let's see how long it lasts now
10:31 AM Emil: I mean, what the heck. I'm just glad that I can have multiple nicks simultaniously :D Emil_
11:09 AM skz81: ho !! I had a Polish word under my nose since weeks... I only notice it now !
11:10 AM skz81: COFNIJ, which means "back" (here on a set-top-box RCU)
01:13 PM Jartza: wazzzaaaaaaap
01:17 PM polprog: yo
01:18 PM polprog: the package came
01:19 PM Emil: Jartza: sup
01:19 PM Emil: polprog: components?
01:19 PM polprog: yeah
01:19 PM polprog: somethings wrong
01:19 PM Emil: what is?
01:20 PM polprog: oh fuck
01:20 PM polprog: i didn't order the mosfets
01:20 PM Emil: trolo
01:20 PM Emil: lo
01:20 PM learath: doh.
01:20 PM polprog: it's got everything but the mosfets
01:21 PM Emil: polprog: place the order then
01:21 PM specing: LOL
01:21 PM polprog: yeah, got a couple other thing to buy and the postage is just $2
01:21 PM Emil: wtf :D
01:21 PM Emil: 2$
01:21 PM specing: me jelly
01:21 PM Emil: I'd just order all the fucking tim
01:21 PM specing: its 5 eur for me
01:22 PM Emil: 2$ god fucking damn
01:23 PM polprog: it's not parcel service, just national post
01:24 PM Emil: Don't care, I would order all the fucking time if I didn't have to pool my purchases :D
01:25 PM Emil: Did you etch the board already?
01:27 PM polprog: no, i got the prints
01:27 PM polprog: on a very think, glossy paper
01:27 PM polprog: 6 pcs
01:32 PM polprog: i'll spread the costs, i wanted to torder some attinys
01:33 PM polprog: i'm thinking about 102, gotta look though the datasheet
01:33 PM specing: Emil: how much is it for you?
01:45 PM Jartza: Emil: soldering's up.
01:45 PM Jartza: this tiny chip is a bit nasty
01:45 PM Jartza: 2.6 x 2.6 mm
01:45 PM Jartza: 8 pins
01:47 PM polprog: ok, odered
01:47 PM polprog: im stupid
01:47 PM pitastrudl: any idea what it reads portb with "in r25, $r16" ?
01:47 PM pitastrudl: http://i.imgur.com/E2bToVm.png
01:48 PM pitastrudl: its an atmega16u2
01:48 PM pitastrudl: im reffering to the example
01:48 PM pitastrudl: the $16 is 22 in decimal form but i cant find anything that could be on that adress
01:49 PM pitastrudl: are there any presets that might be missing in this context?
01:49 PM polprog: $16 is PINB
01:50 PM polprog: in mega 16, the register summary is on the end of the datasheet
01:50 PM polprog: there's no need to convert it to any decimal
01:51 PM pitastrudl: polprog: i cant find it , if i search for 0x16 i get TIFR1
01:52 PM pitastrudl: portb is 0x05
01:52 PM polprog: page 331,
01:52 PM pitastrudl: i have 310 pages
01:52 PM polprog: http://www.atmel.com/images/doc2466.pdf
01:53 PM pitastrudl: oh
01:53 PM polprog: ;) the only right one
01:53 PM pitastrudl: ah right, the instruction set manual doesnt exclusevly refer to the atmega16u2
01:53 PM pitastrudl: heh :D
01:54 PM pitastrudl: thanks polprog
01:54 PM polprog: you're welcome
01:54 PM polprog: i might try my hand at assembly too
01:54 PM polprog: :D
01:55 PM pitastrudl: :D
01:56 PM polprog: got a link to that manual?
02:12 PM JanC_ is now known as JanC
02:59 PM pitastrudl: polprog: the instruction one
02:59 PM pitastrudl: ?
03:02 PM pitastrudl: http://pitastrudl.me/downloads/ukazi.pdf
03:52 PM Jan-: hihi
03:53 PM Jan-: silly question
03:53 PM Jan-: I have a tiny one line bit of code that enables or disables a specific thing
03:53 PM Jan-: should I put that in a #define
03:54 PM Jan-: it's like NRF_PORT |= (1<<NRF_CE_PIN);
03:54 PM Casper: is it a compile time option or part specific line?
03:55 PM Jan-: compile time.
03:55 PM Jan-: NRF_PORT is itself a define
03:55 PM Casper: then would you gain any advantage to put it in a define?
03:56 PM Jan-: then it wouldn't be a function call.
03:56 PM Jan-: I guess the compiler will probably inline it.
04:01 PM Emil: specing: from tme? ooh it's only 7,9€, not too shabby actually
04:02 PM specing: Emil: where are you?
04:02 PM specing: I have 5 eur from Farnell
04:06 PM Emil: specing: kylhä siu nyy pittäissi tiettäähä
04:14 PM Jan-: is that a language :)
04:14 PM Jan-: and if so how on earth do you pronounce a double-Y
04:14 PM Emil: Definitely, just mangled
04:15 PM specing: I'm going with Finland
04:15 PM Emil: The funny thing about my language is that you can mangle it A LOT and break every single translator service
04:15 PM Emil: and all of my people understand it just fine and well >:D
04:15 PM Emil: specing: beep bop we have a winrar
04:15 PM Jan-: it sounded like a series of Ikea products
04:15 PM specing: Emil: lol guessed it!
04:17 PM Emil: Jan-: nah, it says: "kyllä sinun nyt pitäisi tietää"
04:21 PM Lambda_Aurigae: pfoowie on you too.
04:22 PM Emil: https://emil.fi/jako/videot/2017-04-03_23-51-35_AHAV0MvR.mp4 ShareX is a little bit too convenient
04:25 PM Emil: Hmm, I wonder if I went full autism
04:25 PM Lambda_Aurigae: sounds like it.
04:26 PM Emil: Agreed
04:26 PM Emil: But there you go
04:26 PM Lambda_Aurigae: am kinda picturing you rocking back and forth in your chair while staring out the window and randomly typing.
04:26 PM Emil: not too far off
04:28 PM Lambda_Aurigae: http://whotv.com/2013/09/21/morning-explosion-cause-under-investigation/
04:28 PM Lambda_Aurigae: that happened a few years back here.
04:28 PM Lambda_Aurigae: that's me in the interview.
04:28 PM Jan-: is that like.
04:28 PM Jan-: lam-da-o-ri-gay
04:28 PM Lambda_Aurigae: I've always wanted to use the term, "Earth shattering kaboom" on tv..
04:29 PM Jan-: kaboom is not a technical term, lam-da.
04:29 PM Lambda_Aurigae: pretty close there Jan-
04:29 PM Lambda_Aurigae: it is if you are a marvin the martian fan!
04:29 PM Lambda_Aurigae: and you get woke up from a sound sleep by said kaboom at 4:15AM!
04:30 PM Jan-: 4.15am doesn't exist
04:30 PM Emil: Lambda_Aurigae: you moved?
04:30 PM Lambda_Aurigae: been here almost 9 years
04:31 PM Lambda_Aurigae: that happened in september 2013.
04:31 PM Emil: what do you use to host irc?
04:31 PM Lambda_Aurigae: host?
04:31 PM Emil: Do you use a vpn?
04:32 PM Lambda_Aurigae: oh.
04:32 PM Lambda_Aurigae: no, depending on my mood, I either use vnc over ssh or teamviewer.
04:32 PM Emil: Because I believe your are just bamboozling us
04:32 PM Lambda_Aurigae: how is that?
04:32 PM Lambda_Aurigae: I live in small town Iowa, USA
04:33 PM Emil: Iowa is not in Marshall county
04:33 PM Lambda_Aurigae: marshall county is in iowa
04:33 PM Emil: Ohfuck there are two
04:33 PM Emil: Fuck me :D
04:33 PM Emil: I can't into internet detective
04:33 PM Lambda_Aurigae: there are marshall counties all over the country.
04:33 PM Emil: Noticed T.T
04:35 PM Lambda_Aurigae: https://www.google.com/maps/place/1729+Marble+Rd,+Union,+IA+50258/@42.1732963,-93.0957565,518m/data=!3m1!1e3!4m5!3m4!1s0x87efb535b9207049:0xa224e959427fd913!8m2!3d42.1732963!4d-93.0935678
04:35 PM Lambda_Aurigae: my place.
04:35 PM Lambda_Aurigae: my house is northwest corner of that intersection
04:35 PM Lambda_Aurigae: my workshed is southwest corner
04:35 PM Emil: You have a workshed :o
04:35 PM Lambda_Aurigae: the rebuilt(3rd build) building that blew up is the big white thing southwest of my workshed.
04:36 PM Lambda_Aurigae: the building blew up...well, partially...because of a propane leak at the furnace.
04:37 PM Emil: But damn, that place seems like the movies
04:37 PM Lambda_Aurigae: when the furnace kicked on at 4:15am to warm up for the morning it went kaboom
04:37 PM Emil: why do you not keep the furnace going all the time?
04:37 PM Emil: It's the same fallacy the brits fall into
04:37 PM Lambda_Aurigae: intelligent thermostat.
04:37 PM Emil: Or do you not have insulation? :D
04:38 PM Lambda_Aurigae: drop temp at night when nobody is there
04:38 PM Lambda_Aurigae: raise it in the morning when someone is going to be there.
04:38 PM Emil: It takes as much energy to warm it up
04:38 PM Emil: Or more
04:38 PM Lambda_Aurigae: the temp wasn't low enough overnight to have it kick on.
04:38 PM Emil: than to just keep it at a steady temp
04:38 PM Emil: Unless you can't into insulation ;)
04:38 PM Lambda_Aurigae: I dunno..I didn't do it..just know what I learned about it.
04:39 PM Lambda_Aurigae: wasn't a really cold night..
04:39 PM Emil: But yeah, you own that green spot that continues north of your place?
04:39 PM Lambda_Aurigae: no..just to the trees around my house.
04:39 PM Emil: Aww
04:39 PM Lambda_Aurigae: if you look just northwest of my place, south of the big green field
04:39 PM Lambda_Aurigae: you will see our garden...my father-n-law owns that plot of land.
04:40 PM Lambda_Aurigae: the tilled area is 25x75 feet.
04:40 PM Emil: Wait, you own only the left side of the intersection
04:40 PM Emil: to the trees
04:41 PM Emil: And you mean northeast?
04:41 PM Lambda_Aurigae: I own from the roads up to the trees to the northwest of the intersection.
04:42 PM Lambda_Aurigae: my father-n-law owns the plot of land to the east of 3rd street, between the green field and where all the trucks and equipment are.
04:42 PM * Jan- pokes at her code with a sharp stick
04:42 PM Lambda_Aurigae: he used to own the green field and an area north of that where there are a couple of buildings but sold that and moved in with us.
04:43 PM Lambda_Aurigae: I have about 1/8 acre here.
04:43 PM Emil: I just realized that Iowa is small :3
04:43 PM Lambda_Aurigae: yeah..it's not too big.
04:44 PM Lambda_Aurigae: with less population in all of iowa than in new york city.
04:44 PM Jan-: iowa!
04:44 PM Emil: But it's still half the size of Finland, give or take :D
04:44 PM Jan-: I heard it was full of corn and sunburned farmers
04:44 PM Lambda_Aurigae: yeah.
04:45 PM Lambda_Aurigae: Jan-, corn, beans, cows, and pigs.
04:45 PM Lambda_Aurigae: a few chickens and turkies too.
04:45 PM Lambda_Aurigae: and a few thousand xerox copiers.
04:45 PM lord_florf: don't forget the fried oreos at the state fair ;)
04:45 PM Lambda_Aurigae: yeah..
04:45 PM Lambda_Aurigae: eat three and you will never forget them.
04:46 PM Lambda_Aurigae: I prefer corndogs though.
04:46 PM Emil: Hmm
04:46 PM Emil: I wonder how much it would cost me to cheapskate myself across the states
04:46 PM Lambda_Aurigae: Emil, you said it's half the size of your country...but this is just one state of 50 in this country.
04:47 PM Lambda_Aurigae: depends...do you have your own oxy tank?
04:47 PM Emil: oxy tank?
04:47 PM Lambda_Aurigae: a crate shipped air freight should be pretty cheap.
04:47 PM Emil: hehe
04:47 PM Emil: that would be some achiebement
04:47 PM Emil: I wonder if it's been tried
04:47 PM Lambda_Aurigae: it has been done.
04:48 PM Lambda_Aurigae: they find people every year who have tried that...they usually survive.
04:48 PM Jan-: So I read up on this chip. And one person said I had to put all these _delay_us(10) in after sending SPI register select commands before sending the register value.
04:48 PM Jan-: But it seems to work if I don't.
04:48 PM Jan-: What do you guys think?
04:48 PM Lambda_Aurigae: Jan-, nrf24l01 or something?
04:48 PM Jan-: that's the one
04:48 PM Emil: Jan-: read the datasheet
04:48 PM Lambda_Aurigae: it tends to be very picky on timing.
04:49 PM Lambda_Aurigae: I used interrupts a lot when dealing with them about 10 years ago.
04:49 PM Jan-: it seems okay with no delays.
04:49 PM Lambda_Aurigae: if it works, go for it.
04:50 PM Lambda_Aurigae: Emil, if you come visit in the winter I have an open apartment.
04:50 PM Lambda_Aurigae: inlaws live with us but they go south to texas for the winter.
04:50 PM Lambda_Aurigae: we cut 1/3 of the house out for an apartment for them...bedroom, living room, bathroom, kitchenette.
04:50 PM Jan-: I'm not sure what the actual delay is if I just set a pin high, then immediately low
04:51 PM Emil: Jan-: one cycle
04:51 PM Jan-: even with C and the compiler in the way?
04:51 PM Emil: Mate
04:51 PM Lambda_Aurigae: Emil, unless there is some other overhead in C.
04:51 PM Emil: Lambda_Aurigae: that would be an achievement
04:51 PM Lambda_Aurigae: Jan-, wouldn't think it would be more than 10 cycles.
04:51 PM Emil: especially if the code is
04:52 PM Lambda_Aurigae: look at the output of the compiler...you can get it to generate assembly code.
04:52 PM Emil: PORTx|=value; PORTx&=~value;
04:52 PM Lambda_Aurigae: that will tell you exactly what's going on.
04:52 PM Emil: actually
04:52 PM Emil: PINx=value; PINx=value;
04:52 PM Emil: if on supporting chips
04:52 PM Lambda_Aurigae: assuming "value" is a constant and not a variable then it should generate very tight code.
04:53 PM Emil: Lambda_Aurigae: it's loaded into a register first, either way
04:53 PM Lambda_Aurigae: even being a variable, it should be a register and not have to reload.
04:53 PM Emil: I should learn avr asm
04:53 PM Emil: the whole thing
04:54 PM Emil: from startup to whatever
04:55 PM Jan-: I think I have it transmitting.
04:55 PM Jan-: I wonder if I set _delay_us(0) if it'll get compiled out
04:56 PM Lambda_Aurigae: https://www.google.com/maps/place/1620+E+Olive+St,+Marshalltown,+IA+50158/@42.0287212,-92.8874043,182m/data=!3m1!1e3!4m5!3m4!1s0x87efa4c4c822bc43:0xba10373fe5f0e766!8m2!3d42.0283709!4d-92.8875508 and here is where I work...
04:56 PM specing: Emil: I knew avr asm once
04:56 PM Emil: specing: then what happened?
04:56 PM Emil: Jan-: it's a macro so there might be the initial setup
04:57 PM Emil: Jan-: but otherwise "yes"
04:57 PM specing: Emil: I enrolled into computer science
04:57 PM Jan-: I don't really want to have all these delays in.
04:57 PM Jan-: 160 clock cycles each! that's a whole subroutine's worth!
04:58 PM Emil: Lambda_Aurigae: that's quite the straight drive :D
04:58 PM Emil: specing: heh
04:58 PM Emil: Jan-: then don? Use interrupts
04:58 PM Jan-: that would get supercomplicated.
04:58 PM Jan-: there's heaps of places to have delays
04:59 PM Emil: eh
04:59 PM Emil: depends
04:59 PM Emil: Structure code differently and suddenly it's easy af
04:59 PM Emil: But seriously
04:59 PM Lambda_Aurigae: Emil, bout 25 minute drive to the office from home.
04:59 PM Lambda_Aurigae: however, I cover most of the state of iowa.
04:59 PM Emil: Jan-: but seriously, if it werks like it is with delays and is good enough, that's good enough
04:59 PM Lambda_Aurigae: have gone as far as 4 hour drive from the office for service calls.
05:00 PM Jan-: Emil frankly it works without the delays.
05:00 PM Lambda_Aurigae: Jan-, then don't use them.
05:00 PM Jan-: I wonder if I have a clone chip, and if they're less fussy than the real ones :)
05:00 PM Lambda_Aurigae: but test the heck out of it.
05:00 PM Lambda_Aurigae: you have a newer one than I had I'm sure.
05:00 PM Jan-: well that was sort of the idea. put the delay in a define.
05:00 PM Jan-: then if it breaks I can quickly pop it back in
05:01 PM Jan-: I suppose I could #define NRF_COURTESY_DELAY // _delay_us(10)
05:01 PM Jan-: teehee
05:01 PM * Jan- is evil
05:01 PM JanC is now known as Guest6267
05:01 PM JanC_ is now known as JanC
05:02 PM Emil: Jan-: I don't know if that works
05:03 PM Jan-: me either
05:03 PM Jan-: let's find out!
05:03 PM Emil: That's the spirit
05:05 PM Jan-: I feel the need to put () on the end of defines that insert function calls.
05:05 PM Jan-: Is this bad.
05:06 PM Jan-: well what we discussed works, but I'm not sure if that's because the preprocessor is overlooking the code after the // and thus defining the define to be empty, or because it's preprocessing the commented-out code into the define reference location.
05:07 PM Lambda_Aurigae: you would use an #ifdef
05:07 PM Lambda_Aurigae: at the top of the code you #define NRF_DELAY
05:07 PM Jan-: uhhuh
05:07 PM Lambda_Aurigae: then in the code you use #ifdef NRF_DELAY
05:07 PM Emil: This
05:07 PM Tom_L: what are those "MINI" DB25 connectors called?
05:07 PM Lambda_Aurigae: Tom_L, mini db25?
05:07 PM Tom_L: about half size
05:08 PM Tom_L: metric i'm sure
05:08 PM Jan-: what does ifdef detect, the presence of the previous define, or the fact that NRF_DELAY is empty?
05:08 PM Tom_L: if you have a value defined do this
05:08 PM Tom_L: ifdef jan is a girl
05:08 PM Emil: if a symbol exists
05:08 PM Tom_L: do this
05:09 PM Lambda_Aurigae: dsub high density
05:09 PM Tom_L: elseif jan is a hottie
05:09 PM Tom_L: do that
05:09 PM Tom_L: you get the idea
05:09 PM * Jan- is too short to be a hottie
05:09 PM Lambda_Aurigae: the ifdef detects if the define is defined.
05:09 PM * Jan- jumps up and down comically in a failed attempt to reach things on a shelf that isn't really all that high
05:09 PM Emil: Tom_L: tell me what you feel watching this video: https://www.youtube.com/watch?v=0M9cypF0Pyk
05:09 PM Tom_L: naw
05:10 PM Lambda_Aurigae: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/cpp/Ifdef.html
05:10 PM Emil: you should
05:10 PM Jan-: so "#define FOOBAR" without a value still satisfies ifdef
05:10 PM Emil: yes
05:10 PM Jan-: uhhuh
05:10 PM Emil: You haven't seen any library include protection code?
05:10 PM Jan-: I'm not really a C programmer (can't you tell?)
05:11 PM Emil: You know the Cpp is actually fucking stupid and doing #include lib.h twice will include it twice
05:11 PM Lambda_Aurigae: http://en.cppreference.com/w/cpp/preprocessor/conditional
05:11 PM Jan-: I'm used to something we call "namespaces." I appreciate this will be fearsome and confusing to you people.
05:11 PM Emil: you can protect against that by doing the ifdef protection
05:11 PM Lambda_Aurigae: Jan-, I've dealt with namespaces in java.
05:11 PM Emil: #ifndef LIBNAME #define LIBNAME #include asdf #endif
05:12 PM Emil: Jan-: lol
05:12 PM Emil: Jan-: C programmers can usually understand all the concepts just fine
05:12 PM Emil: ;)
05:12 PM Jan-: C feels like a really primitive macro language for assembly language. With a bunch of find-n-replace crap bolted on and added to gradually over the years with no real plan.
05:12 PM Emil: namespaces arise naturally when you start to think about portability of your libraries for C
05:12 PM Emil: lol
05:13 PM Lambda_Aurigae: bolted on after the fact, eh?
05:13 PM Emil: It IS a high level language
05:13 PM Lambda_Aurigae: never really looked at C have you?
05:13 PM Lambda_Aurigae: C was written to write UNIX!
05:13 PM Jan-: well no, I'm used to Csharp and javascript
05:13 PM xentrac: Jan-: it sounds like you haven't programmed in macro assembler; I highly recommend the experience
05:13 PM Jan-: THOSE are high level languages
05:13 PM Lambda_Aurigae: no...those are scripting languages
05:13 PM Emil: Jan-: no different really
05:13 PM xentrac: well, Kernighan and Ritchie describe C as "a fairly low-level language"
05:13 PM Jan-: c sharp is a virtual machine thing like java, it's not really script.
05:14 PM Emil: Once you program enough you notice that everthing is just function calls. Rarely does the actual syntax change
05:14 PM xentrac: and I agree
05:14 PM Lambda_Aurigae: java is a scripting language too in my opinion.
05:14 PM Lambda_Aurigae: just half compiled
05:14 PM Jan-: Emil I was reflecting a few minutes ago that the difference between nrf_deselect() and nrf.deselect() is really in the details.
05:14 PM Emil: Jan-: javascript is not much different from asynchronous avr programming
05:15 PM Lambda_Aurigae: we were doing "object oriented" programming in C before C++ existed....it is mostly a state of mind...C++ just forces some of it on you.
05:15 PM xentrac: Emil: in the AVR you have the option of writing a threads package
05:15 PM Emil: xentrac: hehe, true
05:15 PM xentrac: Lambda_Aurigae: how old are you?
05:15 PM Jan-: I mean I understand why people like C, I'm not going to take against it, but when you get people starting to say that it's just a bit too primitive, the lack of buffer length protection is causing security problems, etc.
05:15 PM Jan-: I can sort of see that.
05:15 PM Emil: I should code my own COOP lib
05:15 PM Emil: for shit and giggles
05:16 PM Emil: Jan-: wrap it
05:16 PM Emil: Jan-: nothing prevents that
05:16 PM Lambda_Aurigae: xentrac, 49
05:16 PM xentrac: Jan-: yeah, C is definitely somewhat hazardous
05:16 PM Emil: Jan-: it's actually super easy, too
05:16 PM Jan-: I'm not sure it's THAT hazardous, but it does present risks. Frankly I think for modern applications (not microcontrollers!) it's probably just a bit too basic
05:16 PM Jan-: but only a bit
05:16 PM Lambda_Aurigae: Jan-, buffer length protection is up to the programmer, not the language!
05:16 PM Emil: Jan-: then you notice that, oops, this takes cycles, a lot if accessed multiple times
05:17 PM Emil: and then you realise why it's good to have the possibility to write good code
05:17 PM xentrac: Lambda_Aurigae: the first version of C++ came out when you were 15; were you writing OO C then?
05:17 PM Emil: instead of building safetys everywhere
05:17 PM Lambda_Aurigae: xentrac, ok...before we ever heard of C++...
05:17 PM xentrac: oh, sure
05:17 PM Lambda_Aurigae: I was 19 when we were programming C with objects.
05:18 PM Lambda_Aurigae: we used structs containing variables and functions.
05:18 PM Jan-: Emil I know what you're saying, but I also think it's a bit extreme to take the position that literally everything has to be written in C these days.
05:18 PM Emil: Jan-: wat?
05:18 PM Emil: I didn't say that :D
05:18 PM Jan-: we're starting to ask for apps to do a LOT, and doing it all in C is just... sheesh.
05:18 PM xentrac: I kind of figured that if you had been doing OO programming in 1983 you probably would have said "we were doing object-oriented programming in Smalltalk before C++ existed" :)
05:18 PM Lambda_Aurigae: eeewww...never did like smalltalk.
05:18 PM Emil: Jan-: and like you noticed, nrf_deselect() vs nrf.deselect() is only an implementation difference
05:18 PM xentrac: Jan-: yeah, that is such an extreme position that as far as I know nobody holds it
05:19 PM Emil: Jan-: libraries are for when you want to achieve more
05:19 PM Lambda_Aurigae: but, I wrote my own basic compiler-ish on the vic-20 when I was 15.
05:19 PM Jan-: I have written quite a bit of Csharp, I was quite pleasantly surprised at how fast it was.
05:19 PM xentrac: you too can be a Library Achieverâ„¢
05:19 PM Jan-: it wasn't so much slow as memory hungry.
05:19 PM Emil: Jan-: like with js, do you write your own boilerplate code?
05:19 PM Jan-: well when I do JS I'm usually *not* doing websites, so it's not a very normal situation.
05:19 PM Emil: Jan-: you do realise that C# and java just give you those from standard libs
05:19 PM xentrac: eewww, boilerplate
05:19 PM Lambda_Aurigae: Jan-, C#/Mono...sounds like a disease to me.
05:20 PM Lambda_Aurigae: but, my favorite game is written in Mono/C#
05:20 PM Lambda_Aurigae: and, yes, it is HORRIBLY memory hungry.
05:20 PM xentrac: Jan-: if you're interested in the reasons for the memory-hungriness, you might want to read http://canonical.org/~kragen/memory-models
05:20 PM Jan-: Lambda_Aurigae, I wrote a DPX file writer in C#, that's a basic bitmap file format used in film and TV. it was maybe 15% slower than comparable native code but used nearly twice the RAM.
05:20 PM xentrac: I mean I should finish writing it but apparently some people have enjoyed reading it even in its current state
05:21 PM Jan-: and that was some heavy lifting, we were writing HD frames at 24 frames second.
05:21 PM Lambda_Aurigae: slower AND larger!
05:21 PM Jan-: yes, but I wrote it in a weekend.
05:21 PM xentrac: yes, that's usually the case?
05:21 PM Jan-: which is sort of the point.
05:21 PM xentrac: I mean twice the RAM is small compared to what you pay for Python
05:21 PM Lambda_Aurigae: and I know someone who make blinky lights on an arduino in 5 minutes too.
05:21 PM Emil: I can write a blink in 20 seconds!
05:22 PM Jan-: I'm no big microsoft fan but I thought that the .net runtime actually wasn't that terrible, I have to say.
05:22 PM Lambda_Aurigae: each language has its ups and downs though...and their own usages too.
05:22 PM Lambda_Aurigae: I still write web cgi in C though.
05:22 PM Jan-: it depends on the situation.
05:22 PM xentrac: Lambda_Aurigae: that's a terrible idea, and I say this as someone who has written a web server in assembly language
05:22 PM Jan-: if you're going to deploy your web cgi across 500 servers and handle a million requests an hour for years on end, jeez, sure.
05:22 PM Emil: I'm implementing a threading server in C for my own web application backend :)
05:22 PM Emil: And making it extdable
05:22 PM Lambda_Aurigae: xentrac, it works, it's fast, and nobody is gonna steal it easily.
05:23 PM Emil: extendable*, so that I can change file backends easy
05:23 PM xentrac: they might find buffer overflows in it easily
05:23 PM Jan-: if you're just looking to record some video to a file format that the supplied software doesn't do, then sheesh, whack it up in Csharp and pay $notmuch for ram.
05:23 PM Emil: Jan-: million requests per hour is actually quite little ,)
05:23 PM Lambda_Aurigae: if you do it in csharp then you gotta run it on windows...
05:23 PM Jan-: well you know what I mean
05:23 PM Lambda_Aurigae: if you use generic-ish mono then you can go multiplatform.
05:23 PM Jan-: lambda, theoretically there's mono on linux, but I haven't used it.
05:23 PM xentrac: if it's only a million requests per hour and you're going to use CGI you could just use Perl
05:24 PM Lambda_Aurigae: it is not 100% csharp compatible..
05:24 PM Jan-: interestingly all of the csharp I wrote was *not* gui apps.
05:24 PM Lambda_Aurigae: getting closer
05:24 PM Jan-: so possibly mono would have been OK
05:24 PM Emil: Jan-: switch to linux and we might respect your opinion ;)
05:24 PM Jan-: although a lot of them used directshow.
05:24 PM xentrac: with regard to AVRs, am I misreading the datasheet or does the internal temperature sensor really have a ±10° error?
05:24 PM Lambda_Aurigae: xentrac, yes..
05:24 PM Emil: xentrac: why not?
05:25 PM Emil: xentrac: but it's not constantly changing +-10 degrees
05:25 PM Lambda_Aurigae: xentrac, there is a pretty high error...it's a cheap sensor..also, you won't get ambient temp..you get chip temp.
05:25 PM Emil: just that the absolute error at any given point is between those ranges
05:25 PM Lambda_Aurigae: once calibrated it's pretty dead on.
05:25 PM Emil: But you can also calibrate the chip temp to ambient
05:25 PM Emil: yeah
05:26 PM Lambda_Aurigae: Emil, problem is, as you run it, it heats up.
05:26 PM Lambda_Aurigae: put it to sleep, it cools down.
05:26 PM xentrac: you mean that once you calibrate it, the error is much smaller, like 1°?
05:26 PM Lambda_Aurigae: which makes it pretty useless as a long term ambient sensor..
05:26 PM Lambda_Aurigae: it is just a thermistor after all.
05:26 PM xentrac: I suppose that how much it heats up depends on how much you run it and at what voltage, no?
05:27 PM Jan-: oh also I would at least try linux but there are no workable screenreaders
05:27 PM Jan-: so don't judge
05:27 PM xentrac: is it really a thermistor? I'd've expected it'd use a diode junction or something
05:27 PM Lambda_Aurigae: what voltage you run the chip, what speed clock, how much current you draw on the various outputs.
05:27 PM xentrac: Jan-: yeah, that's a big problem, to the point that a lot of Linux programmers use Windows to run their screenreader on
05:27 PM Jan-: to be honest it's just a bit flaky for me, anyway
05:27 PM Emil: Lambda_Aurigae: it doesn't heat much
05:28 PM specing: Jan-: so write one!
05:28 PM Emil: Lambda_Aurigae: and if you do a lot of nothing it's usable :
05:28 PM Emil: )
05:28 PM Lambda_Aurigae: I have a text to speech addon for xchat/hexchat that talks to me just fine.
05:28 PM Jan-: it seems to me that if you set it up to do one job it will do that job for a million years, but if you want to keep changing it around, it's a bit screwy.
05:28 PM specing: Jan-: you can make a workable screenreader happen
05:28 PM Jan-: specing: what part of "not really a programmer" is unclear :)
05:28 PM xentrac: Jan-: are you talking about Windows or about your screenreader?
05:28 PM Emil: screenreader?
05:28 PM xentrac: Emil: a piece of software that converts text on the screen to speech
05:28 PM Emil: what do you need a screenreader for?
05:28 PM Emil: but
05:28 PM Lambda_Aurigae: Emil, screenreader...text to speach for the visually impaired.
05:28 PM Emil: why
05:28 PM xentrac: presumably Jan- is blind
05:28 PM specing: Jan-: then why are you in this channel?
05:29 PM specing: xentrac: you are correct
05:29 PM Lambda_Aurigae: I use one with different voices for different channels.
05:29 PM specing: Jan-: you are clearly working with code, so being a programmer is only a small step ahead
05:30 PM Lambda_Aurigae: programmer vs experienced programmer vs good programmer
05:30 PM xentrac: specing: correct about the temperature sensor?
05:30 PM Jan-: in C#, I might lay claim to being a programmer.
05:30 PM Jan-: not in C, not yet
05:30 PM Lambda_Aurigae: Jan-, it's just another language.
05:30 PM Lambda_Aurigae: just learn the specific syntax, fiddle with some libs, and it's,,,,just another language.
05:30 PM Jan-: I gotta say I find it just really primitive
05:30 PM Jan-: I'm not loving the total inability to pass around strings.
05:30 PM Jan-: I mean ffs
05:31 PM Lambda_Aurigae: I haven't found a programming language yet that I couldn't find my way around in.
05:31 PM Jan-: basics people
05:31 PM specing: xentrac: correct about Jan- being blind
05:31 PM specing: Jan-: learn Ada
05:31 PM Jan-: xentrac but don't worry it's not infectious :)
05:31 PM specing: Jan-: you can return strings and more
05:32 PM Jan-: what I want is compiled javascript :D
05:32 PM Jan-: perhaps something with static typing, then I bet you could do i.
05:32 PM specing: why javascript?
05:32 PM specing: ...when you can have Ada.
05:32 PM Emil: specing: because it's the hipster language of the da
05:32 PM Emil: y
05:33 PM Jan-: only popularity really
05:33 PM Emil: Jan-: also watch our for specing, he'll brainwash you into ADA
05:33 PM Jan-: enough people know it that you could get a lot of people up and running quickly, which is sort of the point
05:33 PM Emil: And strings pass around just fine
05:33 PM Jan-: oh pfft. void mungeString(char* chars, int len)
05:33 PM Emil: Jan-: and then you end up with the js and npm situation
05:33 PM Jan-: omgwtf
05:34 PM Emil: "I'll just include this one lib"
05:34 PM Emil: >includes alllllllllALLLLLLL the libs
05:34 PM Emil: depencies everywhere
05:34 PM Emil: It's good that not everyone writes code or libs ;)
05:34 PM Jan-: Emil you would be pleased to know that when I started writing with node I looked at npm and thought "bull" and indeed "shit."
05:34 PM Jan-: oh god I was so smug when they fucked up
05:34 PM Emil: haha :D
05:35 PM Jan-: I just wanted the fast runtime, which I got.
05:35 PM Emil: Which fuckup are you referring to?
05:35 PM Jan-: the left-pad debacle.
05:35 PM Emil: yeah thought so :D
05:35 PM Jan-: look not to seem too "now see here young man"
05:36 PM Jan-: but I've been around code in general long enough to understand that every n years (where n is 1-3) there will be a New Hotness and the New Hotness will have New Things and Widgets.
05:36 PM Jan-: node and NPM stank of being Hotness and Widgets.
05:36 PM Jan-: So I thought "hmm I'll just write javascript like I always did and bullshit to all the widgets," and guess what, I was right.
05:36 PM * Jan- smirks
05:37 PM Emil: Jan-: high five
05:37 PM Emil: You should apply that to C, too
05:37 PM Emil: ;)
05:37 PM Jan-: Hung out in #node a bit. Smelled religion. Took everything they said with a whole shovel of salt.
05:37 PM Tom_L: we preach avr here
05:38 PM Emil: Tom_L: Hear! Hear!
05:39 PM Jan-: well
05:39 PM Jan-: to be honest C is so primitive, especially on microcontrollers, that you can't really have hotness or widgets.
05:39 PM Jan-: and I do understand the desire for it on that basis :)
05:39 PM Emil: wat
05:39 PM Emil: of course you can have hotness or widgets
05:39 PM Jan-: well
05:39 PM Emil: they just cost clock cycles
05:40 PM Jan-: I have written directshow code, so I do know.
05:40 PM Emil: it's up to you to choose libs if you so desire
05:40 PM Jan-: it's a painful memory. I don't like to talk about it.
05:40 PM * Jan- twitches
05:40 PM Emil: Jan-:
05:40 PM specing: > < Jan-> to be honest C is so primitive, especially on microcontrollers, that you can't really have hotness or widgets.
05:40 PM specing: Ada....
05:40 PM Emil: have you programmer in "arduino"?
05:40 PM Tom_L: oh god
05:40 PM Jan-: I have used arduino for super quick things.
05:40 PM Emil: specing: hys you
05:41 PM Emil: Jan-: alrighty
05:41 PM Emil: then
05:41 PM Emil: look at this
05:41 PM Emil: https://emil.fi/jako/koodi/overhead.cpp
05:41 PM specing: Ada has everything c++ has and more
05:41 PM Jan-: in fact a major london stage musical is currently running its sound effects using arduino code I wrote :)
05:41 PM specing: well ok, C++'s templates are more powerful
05:41 PM Emil: I just had a heart attack
05:41 PM Tom_L: arduino rates right up there with Microsoft with bloatware
05:41 PM Emil: Jan-: NOT PRODUCTION READY
05:41 PM Emil: :D
05:41 PM Jan-: oh puhleeaze.
05:42 PM Jan-: it's like four lines of code. it interfaces fader-start switches to minidisc decks.
05:42 PM Emil: Jan-: and how many libs?
05:42 PM Jan-: (yes minidisc in 2017, woo)
05:42 PM Jan-: well just the arduino core, which I guess is... a lot :)
05:42 PM Tom_L: libs will eat your lunch
05:42 PM Emil: Like, 99.9% percent of all arduino libs are _cancer_
05:42 PM Jan-: Tom_L arduino libs will steal your lunch money!
05:43 PM Tom_L: they won't get much
05:43 PM Jan-: well emil, I wrote in about 150 lines of C what the arduino library for the nrf24 chip took 20k of code to do.
05:43 PM Jan-: and it's not nice code
05:43 PM Jan-: there's only three comments, and one of those is the GPL
05:43 PM Tom_L: now output the c to asm and clean that up and see how tiny it really can be
05:44 PM Jan-: the thing is tom, this is an audio synchronising tool for moviemaking. so timing is everything. I want it small.
05:44 PM Emil: Jan-: the nrf has timing limitations, too
05:44 PM Tom_L: i figured it had something to do with flicks
05:45 PM Emil: Also more code can be faster
05:45 PM Tom_L: that's mostly what you're about
05:45 PM Jan-: objective: http://www.pinknoise-systems.co.uk/denecke-timecode-systems-intellislate.html
05:45 PM Emil: Holyshit what
05:45 PM Emil: I should start to make those
05:45 PM Jan-: you may notice the price is one eternal human soul.
05:47 PM Jan-: (it does more than is immediately obvious, but shit, right?)
05:48 PM Emil: I mean
05:48 PM Emil: I can actually calculate how to come to that price
05:48 PM Emil: And it's "reasonable"
05:48 PM Emil: for one off products
05:48 PM Emil: after that it's just assembly
05:49 PM Emil: And price drops considerably
05:49 PM Jan-: it does probably have a temperature controlled crystal oscillator in it.
05:49 PM Jan-: but they're $30 or something
05:49 PM Emil: wat
05:49 PM Tom_L: don't forget patent and lawyer fees
05:49 PM Emil: lol no i doesn't
05:49 PM Emil: Tom_L: yeah
05:50 PM Jan-: Tom_L the idea is to public-domain our code, then anyone with a patent claim can give it their best shot.
05:52 PM Emil: But yeah
05:52 PM Jan-: to be fair emil it isn't as simple as it seems, it has a lot of tricky timing stuff in it, you can plug it into a timecode source and it will sync to it, then you can disconnect and it'll stay in sync for longish periods.
05:52 PM Emil: I'll hibernate now
05:52 PM Jan-: for that you would need the t.c.x.o.
05:52 PM Emil: Jan-: no, you don't
05:52 PM Emil: But yeah I can understand the price
05:52 PM Jan-: Well you can do it with a radio link, which is our plan A.
05:53 PM Jan-: the price is mainly small market.
05:53 PM Jan-: and it's built to a standard, it isn't consumer electronics.
05:53 PM Emil: gOOD NIGHT
05:53 PM Emil: Good night*
05:54 PM Jan-: nini emil
06:06 PM Jan-: There are basically two modes I can transmit on with the nordic RF chip.
06:06 PM Jan-: I can either leave chip-enable high and keep blasting bits into its transmit buffer, or I can send the bits and pulse CE.
06:07 PM Jan-: I'm going to call the function which does the latter nrf_transmit_immediate(uint8_t* payload, uint8_t len)
06:07 PM Jan-: sound reasonable?
06:58 PM Jan-: do we use one | or two || for combining conditions in an if()?
07:09 PM Casper: one?
07:11 PM * Jan- is too used to javascript
07:18 PM NoHitWonder: https://www.tutorialspoint.com/cprogramming/c_logical_operators.htm
07:19 PM Jan-: I never thought I'd set #define NRF_FCC_COMPLIANT :)
07:57 PM Tachyon` is now known as Tachaway
08:25 PM arij is now known as arij_work
08:30 PM arij_work is now known as arij
09:50 PM enhering: Hi.
11:49 PM Tachyon` is now known as Tachaway