rasterweb, 2 days ago to random I'm using python.microbit.org to write Python code for the micro:bit but one thing I don't get is things like: pin0.write_analog(128) pin1.write_analog(64) So like if I want to write a function that will work with any pin how do I do that? Do I need a big if/else with all the pins? (pin0.write_analog, pin1.write_analog, etc.) #python #coding #programming #code #microbit
I'm using python.microbit.org to write Python code for the micro:bit but one thing I don't get is things like:
pin0.write_analog(128) pin1.write_analog(64)
So like if I want to write a function that will work with any pin how do I do that?
Do I need a big if/else with all the pins? (pin0.write_analog, pin1.write_analog, etc.)
#python #coding #programming #code #microbit
vruz, 3 months ago to random Greenest programming languages according to this paper. "Energy Efficiency across Programming Languages: How does Energy, Time and Memory Relate?" Website: https://sites.google.com/view/energy-efficiency-languages [PDF] https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf #comsci #programming #golang #ruby #chapel #cpp #java #python #rust #rustlang Energy Efficiency across Programming Languages How Do Energy, Time, and Memory Relate? Rui Pereira HASLab/INESC TEC Universidade do Minho, Portugal ruipereira@di.uminho.pt Marco Couto HASLab/INESC TEC Universidade do Minho, Portugal marco.l.couto@inesctec.pt Francisco Ribeiro, Rui Rua HASLab/INESC TEC Universidade do Minho, Portugal fribeiro@di.uminho.pt rrua@di.uminho.pt Jácome Cunha NOVA LINCS, DI, FCT Univ. Nova de Lisboa, Portugal jacome@fct.unl.pt João Paulo Fernandes Release/LISP, CISUC Universidade de Coimbra, Portugal jpf@dei.uc.pt João Saraiva HASLab/INESC TEC Universidade do Minho, Portugal saraiva@di.uminho.pt Abstract This paper presents a study of the runtime, memory usage and energy consumption of twenty seven well-known soft- ware languages. We monitor the performance of such lan- guages using ten different programming problems, expressed in each of the languages. Our results show interesting find- ings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consump- tion. We show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern. image/png
Greenest programming languages according to this paper.
"Energy Efficiency across Programming Languages: How does Energy, Time and Memory Relate?"
Website: https://sites.google.com/view/energy-efficiency-languages
[PDF] https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf
#comsci #programming #golang #ruby #chapel #cpp #java #python #rust #rustlang
Energy Efficiency across Programming Languages How Do Energy, Time, and Memory Relate? Rui Pereira HASLab/INESC TEC Universidade do Minho, Portugal ruipereira@di.uminho.pt Marco Couto HASLab/INESC TEC Universidade do Minho, Portugal marco.l.couto@inesctec.pt Francisco Ribeiro, Rui Rua HASLab/INESC TEC Universidade do Minho, Portugal fribeiro@di.uminho.pt rrua@di.uminho.pt Jácome Cunha NOVA LINCS, DI, FCT Univ. Nova de Lisboa, Portugal jacome@fct.unl.pt João Paulo Fernandes Release/LISP, CISUC Universidade de Coimbra, Portugal jpf@dei.uc.pt João Saraiva HASLab/INESC TEC Universidade do Minho, Portugal saraiva@di.uminho.pt Abstract This paper presents a study of the runtime, memory usage and energy consumption of twenty seven well-known soft- ware languages. We monitor the performance of such lan- guages using ten different programming problems, expressed in each of the languages. Our results show interesting find- ings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consump- tion. We show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern. image/png
icedquinn, 4 months ago to random anyone have opinions about this? https://nestedtext.org/en/latest/index.html
anyone have opinions about this? https://nestedtext.org/en/latest/index.html
tyil, 4 months ago @icedquinn After having checked for 5 seconds, it looks like a worse version of #YAML, made by someone who loves #Python just a little too much.
@icedquinn After having checked for 5 seconds, it looks like a worse version of #YAML, made by someone who loves #Python just a little too much.
loop0, 5 months ago to random Welp, I was just laid off. Anybody looking for senior backend engineers? Location: NYC #python #kubernetes #django #getfedihired #fedihired
Welp, I was just laid off. Anybody looking for senior backend engineers? Location: NYC #python #kubernetes #django #getfedihired #fedihired
worldsendless, 5 months ago to random #humor #python and #CLang performance are largely synonymous to outsiders thanks to wrappers, but in a conversation just between the two of them, speed and errors may be characteristic. I like this double-jab
#humor #python and #CLang performance are largely synonymous to outsiders thanks to wrappers, but in a conversation just between the two of them, speed and errors may be characteristic. I like this double-jab