Top Banner
What Programming Language Should We Use Tomorrow Kim Young Soo
40

What Programming Language Should We Use Tomorrow Kim Young Soo.

Jan 11, 2016

Download

Documents

Marion Adams
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: What Programming Language Should We Use Tomorrow Kim Young Soo.

What Programming Language Should We Use Tomorrow

Kim Young

Soo

Page 2: What Programming Language Should We Use Tomorrow Kim Young Soo.

Introduction

Page 3: What Programming Language Should We Use Tomorrow Kim Young Soo.

Introduction

Language is a religion

• So, what language do you believe?

• So, what language should we use

tomorrow?

We should choose the language which is

good for our purpose

Page 4: What Programming Language Should We Use Tomorrow Kim Young Soo.

Contents

Introduction

Trends and Languages

• Multi-core

• Productivity

• Other trends

Conclusion

Page 5: What Programming Language Should We Use Tomorrow Kim Young Soo.

MULTI-CORE PROCESSLanguage for multi-core parallel programming

Page 6: What Programming Language Should We Use Tomorrow Kim Young Soo.

CPU Clock Limit

Intel Pentium 4 640 (3.2GHz)\62,900

Intel Core 2 Duo E6600 (2.4GHz)\221,840

Page 7: What Programming Language Should We Use Tomorrow Kim Young Soo.

Trend is Multi-Core

Single Core, Dual Core, Quad Core…

• Intel Developed 8-Core “Gainestown”

Page 8: What Programming Language Should We Use Tomorrow Kim Young Soo.

As Mr.Lee Presented…

Functional Language is good for

programming for Multi-core processes

• Pure function

• Optimization

Thread Safe!

• Haskell provides STM (transaction memory)

Page 9: What Programming Language Should We Use Tomorrow Kim Young Soo.

Parallel Programming in Haskell

Page 10: What Programming Language Should We Use Tomorrow Kim Young Soo.

Parallel Programming in C

OpenMP

• We can just use “#prgma omp” directive

• Little more complex than Haskell’s case

But… Really ‘Little’?

• NO!

Page 11: What Programming Language Should We Use Tomorrow Kim Young Soo.

Speed of Functional Language

Very Slow

• Lazy Evaluation

• List Processing

• Garbage Collection

• Etc..

Page 12: What Programming Language Should We Use Tomorrow Kim Young Soo.

Trend is Multi-Core…?

Single Core, Dual Core, Quad Core…

• Intel Developed 8-Core “Gainestown”

Changing not so rapidly

• Still, Even quad-core is not so common

• Expensive

Page 13: What Programming Language Should We Use Tomorrow Kim Young Soo.

But there is…

In my computer, there is a device

which

• Can process numbers faster than CPU!

• Have more core than CPU!

• …more expensive than CPU! OTL

Page 14: What Programming Language Should We Use Tomorrow Kim Young Soo.

GPU

GPU in the VGA Card

• To Process Graphic Data

Excessive Number of Vertex and Pixel

We need Simple but Many and Fast

Processer

Page 15: What Programming Language Should We Use Tomorrow Kim Young Soo.

Shading Language

To fully use GPU to process graphic

data

• We need program for GPU : Shader

• Decide GPU’s behavior

Page 16: What Programming Language Should We Use Tomorrow Kim Young Soo.

Shading Language

Shader in DirectX 8Simple.vsh

vs.1.1dp4 oPos.x, v0, c0dp4 oPos.y, v0, c1dp4 oPos.z, v0, c2dp4 oPos.w, v0, c3

dp3 oD1, v3, -c4

mov oD0, c5mov oT0, v7

Page 17: What Programming Language Should We Use Tomorrow Kim Young Soo.

Shading Language

DirectX 9 Provides HLSLPS_OUT ps( PS_IN In ){ PS_OUT Out = ( PS_OUT ) 0; float4 color; float4 shadow;

color = tex2D( sBase, In.Base.xy ); shadow = tex2D( sShadow, In.Shadow.xy );

color = color * shadow;

Out.Color = color; return Out;}

Page 18: What Programming Language Should We Use Tomorrow Kim Young Soo.

Shading Language

High-level shading languages

• CG (C for Graphics)

• GLSL (OpenGL)

• HLSL (DirectX)

• C-like languages

Page 19: What Programming Language Should We Use Tomorrow Kim Young Soo.

Shading Language

And next…?

Graphic Library to Software Rendering

• Tim Sweeney(Epic Games)’s speech in CEDEC 2008

• We need high level language

• Productivity is also important

Basically, shader programming is massive-

parallel

• Shading Language often describe what ‘value’ should

be

• Why cannot be functional?

Page 20: What Programming Language Should We Use Tomorrow Kim Young Soo.

GPGPU

GPU is not only for shading

• Good to Floating point operations

• High-end VGA Card’s has >1 Tflops of

computing power

• GPU for General Purpose

Page 21: What Programming Language Should We Use Tomorrow Kim Young Soo.

GPGPU

NVidia Supports CUDA for GPGPU

• C-like GPGPU program language

• Tesla series graphic card for CUDA

Revolution Started!

Page 22: What Programming Language Should We Use Tomorrow Kim Young Soo.

GPGPU

Page 23: What Programming Language Should We Use Tomorrow Kim Young Soo.

GPGPU

C-like language is not enough

• Will you only use assembly to single thread?

• More high-level

• Language for Parallel computing

Functional?!

Page 24: What Programming Language Should We Use Tomorrow Kim Young Soo.

Functional is not a Panacea

Difficult for common programmers in field

• IO, GUI programming

• Procedural Algorithms

• Flow control

• Why we are still using QWERTY keyboard?

Evaluation cost

Page 25: What Programming Language Should We Use Tomorrow Kim Young Soo.

PRODUCTIVITYEasiness of programming

Page 26: What Programming Language Should We Use Tomorrow Kim Young Soo.

Productivity for Small Program

Easiness is the most important

• For programmer

• Not for programmer

Labview

Matlab

Page 27: What Programming Language Should We Use Tomorrow Kim Young Soo.

Script Language

Python, Ruby, JavaScript and etc..

Very easy to learn

• Simple grammar

• Doesn’t need to consider everything

Some weakly-dynamic typed language

• Easy

• More Intuition Friendly

Page 28: What Programming Language Should We Use Tomorrow Kim Young Soo.

Productivity for Big program

Big and Bigger!

• Mabinogi :

• Windows XP :

• Mac OS X 10.4 :

• Debian 4.0 :

1,000,000 Lines

86,000,000 Lines

283,000,000 Lines

40,000,000 Lines

Page 29: What Programming Language Should We Use Tomorrow Kim Young Soo.

Productivity for Big program

Gears of WarGameplay Code~250,000 lines C++, script code

Gears of WarGameplay Code~250,000 lines C++, script code

Unreal Engine 3 Middleware Game Engine~250,000 lines C++ code

Unreal Engine 3 Middleware Game Engine~250,000 lines C++ code

DirectXGraphics

DirectXGraphics

OpenALAudio

OpenALAudio

OggVorbisMusicCodec

OggVorbisMusicCodec

SpeexSpeechCodec

SpeexSpeechCodec

wxWidgetsWindowLibrary

wxWidgetsWindowLibrary

ZLibDataCompr-ession

ZLibDataCompr-ession

Page 30: What Programming Language Should We Use Tomorrow Kim Young Soo.

Productivity for Big program

Modularity

• Functional Language, OOP…

Reliability

• Memory operation

• Type checking

Concurrency

• I already mentioned about concurrency

Page 31: What Programming Language Should We Use Tomorrow Kim Young Soo.

OTHER TRENDSWeb 2.0, Cloud Computing

Page 32: What Programming Language Should We Use Tomorrow Kim Young Soo.

Web 2.0

Based on web application

• Dynamic web page

• Web based application

Programming Languages?

• Mainly Framework Based

• Easy, Browser-friendly language needed

Page 33: What Programming Language Should We Use Tomorrow Kim Young Soo.

Cloud Computing

Server program should be parallel

Consider browser and network

Page 34: What Programming Language Should We Use Tomorrow Kim Young Soo.

CONCLUSIONFunctional? Script? and…

Page 35: What Programming Language Should We Use Tomorrow Kim Young Soo.

Conclusion

Multi-core Trend

• Concurrency is very important

• High-level language for productivity

• Functional can be answer

Page 36: What Programming Language Should We Use Tomorrow Kim Young Soo.

Conclusion

Productivity is very ‘very’ important

• For small program

Easy script language can be answer

• For big program

Must be well-moduled High-Level language

Functional language can be answer

Page 37: What Programming Language Should We Use Tomorrow Kim Young Soo.

C# is under developing

C#

• structured, imperative, object-oriented,

event-driven, functional, static-strong typed

Microsoft is providing and developing

useful paradigm and functions

Page 38: What Programming Language Should We Use Tomorrow Kim Young Soo.

My Recommendation

Learn and use

• Haskell

• Python or Ruby or Perl

• C#

• And Assembly, C, C++, Delphi , HDL, Java,

Matlab, Labview, Lex, Lua, Prolog, Regular

Expression, Visual Basic…

Page 39: What Programming Language Should We Use Tomorrow Kim Young Soo.

Reference

Tim Sweeney's talk at POPL06 and

CEDEC 2008

Wikipedia

Google Image Search

Page 40: What Programming Language Should We Use Tomorrow Kim Young Soo.

Thanks for your attention