·

Análise de Sistemas ·

Linguagens de Programação

Send your question to AI and receive an answer instantly

Ask Question

Preview text

Linguagens de Script Paradigmas de Programação Centro Universitário Senac Prof Celso Crivelaro celsovcrivelarospsenacbr Problemas comuns Preciso fazer um tratamento de dados antes de entrar no software Debugging em um log de sistema Achar uma requisição que se comportou estranho entre milhares Software rápido para automatizar uma tarefa simples Fazer uma lógica de programação mutável em tempo de execução com o objetivo de extensão da regra de negócio Linguagem específica para problemas diferentes Lidar com Matrizes com arquivos rede etc Exemplos Características Geralmente interpretadas Interpretador de uso geral ou embarcado Tipagem Dinâmica Sintaxe simples e vários açúcares sintáticos syntatic sugars Estruturas de dados bem comportadas e coleções fáceis Senac Uso específico Uso específico Algumas linguagens ou DSLs são muito especializadas no seu contexto Estendem as funcionalidades do software principal Podem ser uma linguagem própria ou de mercado Emacs LISP VBA Sub Exemplo3 Dim valormin As Double Dim valormax As Double valormin RangeB2Value valormax RangeB3Value Dim contador As Integer contador 0 For Each c In Selection If cValue valormin Then contador contador 1 ElseIf cValue valormax Then contador contador 1 End If Next c MsgBox Fora dos limites contador End Sub BashScript binbash INPUTSAMPLELIST1 cd VolumesPhilDriveEMSTestDec7snvpostprocess pathstxt echo Debug level set for DEBUGLEVEL echo log found in scripts directory cp HIGHSNPOUT cp LOWSNPOUT cp GERMSNPOUT echo SCRIPTDIRrunsomaticmutationanalysis i nofalsesnp if DEBUGLEVEL gt 0 then echo INFO SCRIPTDIRrunsomaticmutationanalysissh SAMPLE nofalsesnp basename LOWSNPOUT basename GERMSNPOUT basename HIGHSNPOUT DBAMFILE GBAMFILE LOG fi SCRIPTDIRrunsomaticmutationanalysissh echo End of somatic mutation analysis LOG AWK awk F print 2 arquivo pega 2 coluna separada por Matlab Octave Find Correlations in the Data You can explore your data quickly in the Live Editor by experimenting with parameter values to see how your results will change We can experiment with the data to see if any of the variables in the table are correlated with highway fatalities It appears that highway fatality rates are lower in states with a higher percentage urban population varName urbanPopulation scatterfatalitiesvarName rate Plot fatalities vs selec xlabelvarName ylabelPercent Fatalities per Million Vehicle Miles Senac Uso geral Uso geral Devido a sua facilidade muitas linguagens de script se tornaram de uso geral Pessoas nãodesenvolvedoras conseguem trabalhar com facilidade As linguagens têm sistemas de pacotes e entrega sofisticados A entrega do software é rápida Não tem fase de compilação JS Developer Tools httpsdevelopersgooglecomwebtoolschromedevtools Elements Console Sources Network Performance Memory Paused on event listener click Call Stack anonymous Breakpoints No Breakpoints XHR Breakpoints DOM Breakpoints Global Listeners return d gf function var a jf c Ne functiond return acallcsrc clistener d functiond d acallcsrc clistener d Line 5798 Column 46 Scope Watch Local d MouseEvent this document Closure gf Closure Global Window TIOBE Index for August 2020 August Headline Holiday season in the programming language world This month nothing much happened in the TIOBE index The programming language R continues to rise and is on schedule to become TIOBEs programming language of the year 2020 It is also interesting to follow the ongoing fight for position 10 in the TIOBE index between Go Swift and SQL Swift lost 2 positions this month from 10 to 12 SQL took over and is back in the top 10 this time Also worth noting is Groovys reentrance in the TIOBE index top 20 at the expense of Scratch and the fact that Hack entered the top 50 at position 44 Paul Jansen CEO TIOBE Software The TIOBE Programming Community index is an indicator of the popularity of programming languages The index is updated once a month The ratings are based on the number of skilled engineers worldwide courses and third party vendors Popular search engines such as Google Bing Yahoo Wikipedia Amazon YouTube and Baidu are used to calculate the ratings It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system The definition of the TIOBE index can be found here Aug 2020 Aug 2019 Change Programming Language Ratings Change 1 2 C 1698 183 2 1 v Java 1443 160 3 3 Python 969 033 4 4 C 684 078 5 5 C 468 083 6 6 Visual Basic 466 097 7 7 JavaScript 287 062 8 20 R 279 197 9 8 v PHP 224 017 10 10 SQL 146 017 11 17 Go 143 045 12 18 Swift 142 053 13 19 Perl 111 025 14 15 Assembly language 104 007 15 11 v Ruby 103 028 Python django Flask jupyter scikit learn NumPy Scrapy Vantagens de Uso geral Muitas linguagens democratizaram a programação Pessoas nãotech conseguem programar Bibliotecas potencializam aplicações novas VR processamento de imagens testes de software Novos negócios e empresas A entrega do software é rápida Não tem fase de compilação Desvantagens Geralmente não são performáticas comparadas a linguagens compiladas O controle fino de recursos computacionais não é possível já que é feito pela VM Debbuging é complicado Type Safety é baixo devido ao uso de tipagem dinâmica Larry Wall criador do Perl Teve forte influência de outras ferramentas como AWK sed C e Bash Influenciou as principais linguagens modernas Ruby Python PHP e JS Trouxe a ideia de fazer um mesmo trabalho de várias formas diferentes Menção Honrosa Perl Criada em 1987 com um foco em processamento de texto Foi uma das percussoras da internet os scripts CGI que geravam páginas dinâmicas Quais são boas aplicações de linguagens de script Aplicações Planilhas Processadores de texto Banco de Dados Regras antifraude Games Pré processadores de texto LUA Centro Universitário Senac Prof Celso Crivelaro celsovcrivelarospsenacbr Roberto Ierusalimschy criador do Lua PUC Rio Linguagem de script com tipagem dinânima e tipagem forte Foco em portabilidade e tamanho LuaLab httpwwwluainfpucriobr Usada em engines de games e extensão de softwares de alta performance Lua httpwwwluaorg httpsvimeocom292779036 A Look at the Design of Lua Senac Apresentação do Lua Se está usando Linux Instalando o Lua e Luarocks sudo apt install lua53 luarocks liblua53dev Rodando a VM do Lua print Olá Mundo lua hellolua Olá Mundo lua Lua 535 Copyright C 19942018 Luaorg PUCRio Por que Lua é tão usado LuaVM usada em C VM Compilando usando Lua gcc Iusrincludelua53 o hello helloworldc llua53 gcc IusrlocalCellarlua5351includelua53 o hello llua53 helloworldc No Mac uso homebrew Como a VM Lua funciona Stackbased VM Lua Stackbased O modelo de memória da VM Lua é uma pilha Memória Variáveis e argumentos são empillhados Funções desempilham argumentos e empilha resultados true 45 lalal oi VM Lua Stackbased Exemplo Memória Primeiro empilhase os argumentos 4 e 5 4 5 VM Lua Stackbased Exemplo Memória Ao chamar a função soma se desempilha os argumentos VM Lua Stackbased Exemplo Memória No retorno empilhase o resultado 9 Senac Casos de Uso httpscoronalabscom The 2D Game Engine Unlimited Powerful Free DOWNLOAD Senac EVAL script numkeys key key arg arg Available since 260 Time complexity Depends on the script that is executed Introduction to EVAL EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter built into Redis starting from version 260 The first argument of EVAL is a Lua 51 script The script does not need to define a Lua function and should not It is just a Lua program that will run in the context of the Redis server The second argument of EVAL is the number of arguments that follows the script starting from the third argument that represent Redis key names The arguments can be accessed by Lua using the KEYS global variable in the form of a onebased array so KEYS 1 KEYS 2 All the additional arguments should not represent key names and can be accessed by Lua using the ARGV global variable very similarly to what happens with keys so ARGV1 ARGV 2 The following example should clarify what stated above eval return KEYS1KEYS2ARGV 1ARGV2 2 key1 1 key1 2 key2 3 first 4 second Note as you can see Lua arrays are returned as Redis multi bulk replies that is a Redis return type that your client library will likely convert into an Array type in your programming language Related commands EVAL EVALSHA SCRIPT DEBUG SCRIPT EXISTS SCRIPT FLUSH SCRIPT KILL SCRIPT LOAD httpsredisio httpsgithubcomopenrestylu anginxmodulereadme httpstibiakingcomforumstopic451tutorialbC3A1sicosobrelua Embedded power driven by Lua Quickly prototype and develop embedded software applications with the power of Lua and run them on a wide range of microcontroller architectures Overview What is eLua Status Media License Get Started Using eLua Downloads Web Builder Get Better Official Doc Reference Manual Platforms Tutorials Get Involved Community Wiki Tracker Roadmap News eLua at ESC Boston February 03 2015 1646 James Snyder will be presenting on using eLua for rapid application development at ESC Boston on May 6 New build system in master May 27 2013 0853 The new build system and configurator are now part of master This changes the way you compile your eLua image so please check this link for details AVR32 firmware files updated May 19 2013 0917 A recent investigation on the eLuadev mailing list revealed the fact that the Quotes Very early on in the development of Lua we started using the question But will it work in a microwave oven as a half serious test for including features while avoiding bloat Im glad to see that the eLua project promises to deliver Lua to small devices that can make a difference Luiz Henrique de Figueiredo Lua Team member eLua takes a rocksolid VM and fits it in a small space It lets you program microcontrollers with an easytolearn highlevel language I see this programming model and the eLua project itself really gaining momentum Dean Hall embedded systems Buzzz If you would like to support continued development of eLua please consider donating to the project For details on donation use and other ways to support the project see Get Involved Donate httpwwweluaprojectnet 38 World of Warcraft Wiki Weve Moved This wiki has merged with its Gamepedia counterpart Click to join us on the now combined wiki Lua from the Portuguese word for moon 1 is a scripting language used by World of Warcraft for Interface Customization Only a subset of version 51 of the official Lua specification is implemented and should suit most addon makers needs More information about Lua can be found on the official Lua FAQ Programming References These are not so much guides or tutorials but a place to look for information on the Lua language itself The reader should be somewhat familiar with programming in general Official Reference Manual contains syntax and basic commands but is heavygoing for readers without a programming background Luai alternative way of browsing the manual Reference AddOns WoW API Widget API XML UI Event API WoW Lua Macro API CVars Changes Battlenet API HOWTOs httpswowwikifandomcomwikiLua Referências httpsgithubcomtylerneylonAPIsWithLua httpswwwluaorgmanual53contentshtmlindex Centro Universitário Senac Prof Celso Crivelaro celsovcrivelarospsenacbr Muito Obrigado