lang net
DESCRIPTION
Lang.Net 2009 proposed talkTRANSCRIPT
Survey of Tools & Languages in the “Outside
World”
Keith CurtisSDE 1993 – 2004
http://keithcu.com
http://xkcd.com
About me
Programmer at Microsoft FoxPro, Quill, RichEdit, MIBU / Sendit
(Swedish sub), Spot watch
Discovered Linux by accident after I left Just finished a book describing its
advantages, and remaining challenges
Tools is a huge part of this!
My bookNEW YORK TIMES:
“Keith Curtis, an 11-year veteran of Microsoft, believes deeply that free software is the future of technology.
He takes a programmer’s approach in Software Wars, attempting to systematically build a case that software can help pave the way for a 21st-century renaissance in many fields ranging from artificial intelligence (cars that drive themselves) to the human journey into space (space elevators). For Mr. Curtis, free software is all about leveraging our collective intelligence.”
My book in 1 slide
Case studies of Wikipedia, Linux kernel & desktop
The payoff is things like AI, cancer research Proprietary software is pervasive, even in
universities
Linux's advantage in 1 slide
Okay, one more slide
Anyhoo...
That discussion is for another day
Tool and Languages
Ended up being a big part of my research and thinking during the book-writing
Some caveats: IANALL: I am not a language lawyer C# was a life-changing experience after 7
years of C/C++ & COM at MS I last wrote production code in C# 1.0
But I spent months learning all the details...
Side note about C# 3.0
I saw AndersH's Lang.Net C# 3.0 talk It started off fine, until... “We take the projection of the lambda
function, and return it as an anonymous delegate to the closure of the expression tree.”
seems like Code and Pray if your IQ < 160 Reminds me of COM / ATL
Important idea I discovered
All non-GC, non-kernel mode code should be killed Everyone (here) knows the advantages, but
there isn't any coherent effort on this task Lots of excuses: inertia, perf, snobbery, etc. My book spends 25 pages on this topic!
Tools chapter in 1 slide
Memory is important: the state of a process
GC is the only way to have reliable code I detail memory leaks and buffer overruns
GC is necessary, if insufficient, for the reliable code that we seek.
I say that using C instead of Lisp was the greatest mistake in the history of computing. Lisp invented GC in 1959!!
GC changes programming
GC requires a bunch of infrastructure, which enables a bunch of features
COM Feature NameReference Counting
BSTRType Libraries
IUnknownIDispatch
DCOM
.Net Feature NameGarbage Collection
Unicode stringsmetadata + IL
Everything is an ObjectReflection
Remoting & Web Services
Why?
GC changes programming
Increased reliability & security Increased portability
Same binary on multiple platforms
Increased maintainability Increased usability and functionality
Flows from increased maintainability
Code sharing will increase dramatically Lack of this is the Achilles' heel of software,
esp. free software!
Linux desktop
Underpinnings are all C/C++ FireFox, OpenOffice, Apache, MySQL,
Gnome, KDE, etc.
Just like Microsoft IE, Office, IIS, SQL Server, Shell
VS.NET? C# compiler?
Linux versus Windows
Warring armies of patient cavemen, fashioning their world with stone tools
I think the battle between Linux and Windows boils down to a tools battle
Microsoft
Advantages: Leadership Money Marketshare One platform (.Net)
Disadvantages Older code More complicated
code Smaller army Backward
compatibility constraints
.Net is small in scope (no physics engine, etc.)
Linux
Advantages Army of millions Codebases 10
years younger and 10x smaller Understood by a
worldwide community
Gaining momentum
Disadvantages Tools situation is a
fragmented mess Many duplicate
codebases More code overall No push in this
direction
Boiled down...
.Net is limited by what MS envisions Outside the walled garden is a barren
wasteland
Linux isn't moving away from C/C++ very fast, and there is no clear place to go
What is out there on the free desktop? Java Mono Python Etc.
Sun screwed the pooch
Java have been free from Day 1 Sun focused on JCP, JSR Sun fragmented Java
Wikipedia documents 34 Java runtimes (not including embedded ones!)
Sun sued Microsoft for adding features In C, adding features was encouraged:
“__inline”
Making it free hasn't noticeably changed its trajectory
Java complexity
action, actionPropertyChanged, add, addActionListener, addAncestorListener, addChangeListener, addComponentListener, addContainerListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addImpl, addInputMethodListener, addItemListener, addKeyListener, addMenuDragMouseListener, addMenuKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkHorizontalKey, checkImage, checkVerticalKey, clone, coalesceEvents, computeVisibleRect, configurePropertiesFromAction, contains, countComponents, createActionListener, createActionPropertyChangeListener, createChangeListener, createImage, createItemListener, createToolTip, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doClick, doLayout, enable, enableEvents, enableInputMethods, equals, finalize, findComponentAt, fireActionPerformed, fireItemStateChanged, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, firePropertyChange, fireStateChanged, fireVetoableChange, getAccelerator, getAccessibleContext, getAction, getActionCommand, getActionForKeyStroke, getActionListeners, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBackground, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getChangeListeners, getClass, getClientProperty, getColorModel, getComponent, getComponentAt, getComponentCount, getComponentGraphics, getComponentListeners, getComponentOrientation, getComponentPopupMenu, getComponents, getComponentZOrder, getConditionForKeyStroke, getContainerListeners, getCursor, getDebugGraphicsOptions, getDefaultLocale, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFocusTraversalPolicy, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHideActionText, getHierarchyBoundsListeners, getHierarchyListeners, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getIgnoreRepaint, getInheritsPopupMenu, getInputContext, getInputMap, getInputMethodListeners, getInputMethodRequests, getInputVerifier, getInsets, getItemListeners, getKeyListeners, getLabel, getLayout, getListeners, getLocale, getLocation, getLocationOnScreen, getMargin, getMaximumSize, getMenuDragMouseListeners, getMenuKeyListeners, getMinimumSize, getMnemonic, getModel, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getMultiClickThreshhold, getName, getNextFocusableComponent, getParent, getPeer, getPopupLocation, getPreferredSize, getPressedIcon, getPropertyChangeListeners, getRegisteredKeyStrokes, getRolloverIcon, getRolloverSelectedIcon, getRootPane, getSelectedIcon, getSelectedObjects, getSize, getSubElements, getText, getToolkit, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getTreeLock, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVerticalAlignment, getVerticalTextPosition, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, gotFocus, grabFocus, handleEvent, hasFocus, hashCode, hide, imageUpdate,fireMenuDragMouseReleased isBorderPainted, init, insets, inside, invalidate, isAncestorOf, isArmed, isBackgroundSet, isContentAreaFilled, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusPainted, isFocusTraversable, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isFontSet, isForegroundSet, isLightweight, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isRolloverEnabled, isSelected, isShowing, isValid, isValidateRoot, isVisible, keyDown, keyUp, layout, list, locate, location, lostFocus, menuSelectionChanged, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, notify, notifyAll, paint, paintAll, paintBorder, paintChildren, paintComponent, paintComponents, paintImmediately, paramString, postEvent, preferredSize, prepareImage, print, printAll, printBorder, printChildren, printComponent, printComponents, processComponentEvent, processComponentKeyEvent, processContainerEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyBinding, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, putClientProperty, registerKeyboardAction, remove, removeActionListener, removeAll, removeAncestorListener, removeChangeListener, removeComponentListener, removeContainerListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeItemListener, removeKeyListener, removeMenuDragMouseListener, removeMenuKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, resize, revalidate, scrollRectToVisible, setAccelerator, setAction, setActionCommand, setActionMap, setAlignmentX, setAlignmentY, setArmed, setAutoscrolls, setBackground, setBorder, setBorderPainted, setBounds, setComponentOrientation, setComponentPopupMenu, setComponentZOrder, setContentAreaFilled, setCursor, setDebugGraphicsOptions, setDefaultLocale, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setDoubleBuffered, setDropTarget, setEnabled, setFocusable, setFocusCycleRoot, setFocusPainted, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setForeground, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setIgnoreRepaint, setInheritsPopupMenu, setInputMap, setInputVerifier, setLabel, setLayout, setLocale, setLocation, setMargin, setMaximumSize, setMinimumSize, setMnemonic, setModel, setMultiClickThreshhold, setName, setNextFocusableComponent, setOpaque, setPreferredSize, setPressedIcon, setRequestFocusEnabled, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setSize, setText, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVerticalAlignment, setVerticalTextPosition, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusDownCycle, transferFocusUpCycle, unregisterKeyboardAction, update, updateUI, validate, validateTree, wait
Mono
Built by a community (unlike Java!) Mono works well on Linuxhttp://www.mono-project.com/Screenshots
I run Mono apps every day, Java: never Core language and class libraries have
little community input Mono is richer than .Net, but also
somewhat of a barren wasteland outside ¡¡Enormous!! FUD about Mono...
Causes programmers to choose Java, etc.
Mono FUD (Examples)
“Maybe they are not going to sue for having an implementation of .Net, but because they own a patent which is used in the implementation. That is a different issue.”
“The problem with Mono will probably not occur tomorrow but at a later point in time. Or maybe they want a lot of people to install Mono and use it to have influence on Linux (I think Microsoft would like to get money from everyone that installs Linux).”
“I see Mono as a threat for Linux, and that can easy be solved by not installing Mono.”
“For me, C#/Mono is not the right platform, not because it is technically bad, but simply because I don't like MS being around and potentially blocking things one day, or simply ruling it from behind with suspect purposes toward free software.”
Mono FUD 2 <them> Mono is dangerous because it is covered by patents
<me> So are lots of Linux apps. Why is Mono special?
<them> They’re MICROSOFT patents!
<me> There are lots of Microsoft patents in things. Why is Mono special?
<them> It is inconvenient for me to acknowledge that those exist, so i will pretend they do not. However, Mono is special because it goes out of its way to emulate patented Microsoft software!
<me> Really? Don’t things like Wine do that too, without such bile-filled reaction? And unlike Wine, Mono implements a published standard
<them> The standards are a trap! They can charge you for patent license fees!
<me> True. But they’ve said they won’t. And that’s more than you’ll get out of most people who own patents which are, to all extents and purposes, violated in Free Software projects
<them> But if you start to rely on Mono, then Microsoft can disable you down the line when they suddenly sue!
<me> And that’s different from loads of other software in GNU/Linux how exactly? Smarter people than me or you have a “don’t worry about maybes” attitude.
<them> But Mono is dangerous because it is covered by patents!
http://www2.apebox.org/wordpress/linux/51/
Python
Most popular language on Linux after C/C++
Language with a rich community Gaming, scientific community, etc. Almost every non-trivial piece of C/C++ has
Python wrappers
Under the radar...
Python community
Python, downsides
No standard IDE & debugger Considered too slow for serious apps,
even by fans Python runtime is written in C
Dooh!
IronPython runs slower than CPython?! Also doesn't support Pyd wrappers
There are some JITs but they are “research” projects
On the Web
On the Web It is PHP's world, we just live in it You all might laugh at the language, but it is
infinitely better than C Simple, rich, reliable, with a big community
and set of libraries
Java, .Net, Ruby inside enterprises Ruby's success is b/c of Rails
The rest
Shell scripting: glue for the OS Perl: Slashdot written in it Lisp, Scheme, OCaml: never seen it
Conclusion
It's just a survey, what do you expect? Okay...
Some thoughts
Mono FUD hurts C# Sun should dump Java We need better tools to automatically
wrap C/C++ codebases More important than Linq, etc. Check out Boost / Py++
Is 99% interpreted good enough? If Mono copies .Net and gives it away...
Thanks!!
Buy my book to learn lots more ;-)
Microserfs: Install Ubuntu 9.04