Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
perl is pretty good, so is python and javascript. java is fine. c# is better.

c is best tho

Adbot
ADBOT LOVES YOU

Shark Sandwich
Sep 6, 2010

by R. Guyovich

syntaxrigger posted:

:siren:SHAGGAR ALT ACCOUNT SPOTTED!!:siren:

hey now, while i do enjoy languages that don't begin with p and aren't used by web "developers" i'm also a noted mac enthusiast. plus, our dbs at work are oracle.

rotor posted:

c is best tho

my c is super rusty but i probably learned more about computing from c than 80% of my college classes

Shark Sandwich fucked around with this message at 20:15 on Sep 6, 2012

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

rotor posted:

perl is pretty good, so is python and javascript. java is fine. c# is better.

c is best tho

c's p cool and important but if you're coding in c in 2012 you have either absolute or zero job security, theres no middle ground

salted hash browns
Mar 26, 2007
ykrop

mjs6643 posted:

hey now, while i do enjoy languages that don't begin with p and aren't used by web "developers" i'm also a noted mac enthusiast. plus, our dbs at work are oracle.


my c is super rusty but i probably learned more about computing from c than 80% of my college classes

uh oracle dbs are good

Shark Sandwich
Sep 6, 2010

by R. Guyovich
i know, was just saying i'm not an mssql zealot

syntaxrigger
Jul 7, 2011

Actually you owe me 6! But who's countin?

mjs6643 posted:

hey now, while i do enjoy languages that don't begin with p and aren't used by web "developers" i'm also a noted mac enthusiast. plus, our dbs at work are oracle.


my c is super rusty but i probably learned more about computing from c than 80% of my college classes

a likely story...

Zombywuf
Mar 29, 2008

tef posted:

for me, more clevery type thingys like generics seem to add type safety at the expense of simplicity.

Because Python's dispatch system is so simple?

tef
May 30, 2004

-> some l-system crap ->
as meta object protocols go, it's pretty nice - overriding behaviour at the class, instance and attribute level. descriptors are neat. working on attribute access rather than message passing leads to easier lexical scope capturing, as well as functions/methods you can pass around too.

the smalltalk way doesn't seem as nice, unless you like method calls a lot and hate functions.

thing is, it is pretty much behind the scenes for most python programmers. generics and their ilk, programmers have to deal with them to use them. you don't really need to understand descriptors to use @property, @classmethod or @staticmethod.

tef fucked around with this message at 20:33 on Sep 6, 2012

tef
May 30, 2004

-> some l-system crap ->
really i'd just like traits over class inheritance easily, and mutable at runtime.


yes yes moose yes

ps. if someone tells you the answer is 'perl6' what they mean to say is 'go gently caress yourself'

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

tef posted:

really i'd just like traits over class inheritance easily, and mutable at runtime.

sounds like you want php

tef
May 30, 2004

-> some l-system crap ->
also ruby is this weird lisp-2 thing, where methods and variables live in different places.

so, x=foo.bar; x() this is a method call on foo and a method call on self, x

if you wanted to pass around the bar method, you have to do: x=foo.method(:bar); x.call; I find this scoping weird.

also you get weird things like 'self' in ruby, too i.e

class << self
def method
end
end

meanwhile in python, you can pass around methods and functions and call them. sorted(..., key=len). because self is just another variable, you don't get into var this=that territory.

it's actually quite nice

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
groovy and clojure (and xml, goddamnit) are my goto's on the jvm, hard to beat the flexibility of those two plus all the enterprisey bullshit like maven

ruby and bash for programming-lite scripty throwaway bullshit (like writing php for me)

tef
May 30, 2004

-> some l-system crap ->
the jvm, for turning other languages into java stack traces

tef
May 30, 2004

-> some l-system crap ->
NO gently caress YOU DAD IT'S A REAL LANGUAGE I DON'T CARE THAT THE ERROR MESSAGES ARE IN ANOTHER

tef
May 30, 2004

-> some l-system crap ->
c.f ruby “dsls”

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
eh i know the whole thing so goddamn well at this point it doesn't matter, it's like looking at the matrics

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
also it's really not hard to find out where you hosed up with a stacktrace, and you don't really see too many in either because they don't have checked exceptions

homercles
Feb 14, 2010

java is quite bad
scala course starting up soon
cherry blossoms fall

though java is crap
i'm not a clojure wanker
subtly winter arrives

homercles
Feb 14, 2010

tiny bug child
overposting broken haiku
php supremacy

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i dont really know a lot about the subject, but implementing a DSL seems like great job security and really not much else

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

rotor posted:

i dont really know a lot about the subject, but implementing a DSL seems like great job security and really not much else

depends on how far you go. anyone who pretends writing a dsl is some panacea to let business fags write code is going to fail

if you write a dsl to give names and leverage to common patterns in your code then why the gently caress not write code that writes itself for you?

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

trex eaterofcadrs posted:

depends on how far you go. anyone who pretends writing a dsl is some panacea to let business fags write code is going to fail

if you write a dsl to give names and leverage to common patterns in your code then why the gently caress not write code that writes itself for you?

prograaaaaams

programs that write prograaaaaaams
are the happiest prograaaaaams of aaaaallll

homercles
Feb 14, 2010

training up new programmers on 100k+ lines of complex OO-scripting featuring multiple inheritance, mixins, autoloading routines and other gremlins to haunt your dreams, constructs which one has to trace the source for days at a time to understand because no IDE has a hope in hell of parsing this loving mess...

suddenly this DSL stuff sounds like a vacation. yeah im programming in a language with nonsense typing because im a cool dude who can juggle all the types in my head unlike those idiots writing in static (lol) languages who needs lame IDE help (unless you're talking about code i didn't write then all bets are off clearly this stuff was written by a bad i need to rewrite it for it to be understandable arghblabhghghghgg)

join the clojure supremacy circlejerk plenty of spots free

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
well of course homoiconic languages are the most happy ones

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

trex eaterofcadrs posted:

well of course homoiconic languages are the most happy ones

rules out javascript because their icon hates homos

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

trex eaterofcadrs posted:

well of course homoiconic languages are the most happy ones

this joke reaped a rich harvest of laffs from yours truly

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
:tipshat:

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Jonny 290 posted:

c's p cool and important but if you're coding in c in 2012 you have either absolute or zero job security, theres no middle ground
pssst embedded and unix system development are still things that people get hired to do

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

tef posted:

NO gently caress YOU DAD IT'S A REAL LANGUAGE I DON'T CARE THAT THE ERROR MESSAGES ARE IN ANOTHER
my dad sent me a link to a php job yesterday, told him i looked at it + a brief rant about PHP including T_PAMAAYIM_NEKEUDATOYIM

e: i'll post the rant if anyones interested

Gazpacho fucked around with this message at 23:03 on Sep 6, 2012

tef
May 30, 2004

-> some l-system crap ->
why php is bad because it smell bad the end

tef
May 30, 2004

-> some l-system crap ->


i think i've seen enough php rants

Max Facetime
Apr 18, 2009

lol groovy

looked at an example briefly, went "that's simple, I got this" and produced this elegant piece of code:
code:
def json = hashmap as JSON
outputfile << json
except that wrote a slightly invalid json file, WTF?! turns out "as JSON" doesn't produce json, it produces some JsonFactory thing

the correct code was:
code:
def json = hashmap as JSON
json.render(outputfile)
naturally the useless custom eclipse-based IDE doesn't understand the code at all if I don't manually type every single type

MononcQc
May 29, 2007

tef posted:

basically I thought godël escher bach was a wanky book

I feel it wouldn't have sounded so wanky if people weren't touting it as work of genius every now and then. I found it to be an entertaining read where the author tries to find as many examples of his things as possible, not merely trying to prove them. The book itself could likely be held in around 50 pages if it was straight to the point.

tef posted:

for me, more clevery type thingys like generics seem to add type safety at the expense of simplicity.

i guess it's from watching the erlang camp with a priority on fault tolerance over correctness, and also an optional type checker for offline analysis.

i'm beginning to think that types should just be arbitrary code. essentially, pre/post conditions. it's kinda useful to say 'this sort of pattern', like a regex for a string. or a constraint on a number (within a range).

you can do clever things like eliminating these at compile time, and leaving them as runtime checks otherwise. as if the compiler removed assertions, only when it could show they held. http://sage.soe.ucsc.edu/sage-tr.pdf :psyboom:

or maybe I just want a language with prolog as the type system

I won't be dissing the Erlang approach any day soon.

To define types however, you have two approaches:

  • types for correctness
  • types for expressiveness

For correctness, it's arguable that you don't need them for all types of programs, but for expressiveness, there's something especially nice about them.

On the lower level, they act like tuples, or tags around values to clarify them, and their behaviour ends up similar to what you mention about pre/post conditions. The compiler basically evaluates what it can before runtime (and for correctness, denies unprovable/evaluable tags).

You can get a lot of this done currently with a couple of languages with enough flexibility. Someone posted a blog post on the topic (applied to Common Lisp) today, and it's an interesting take on it.

JawnV6
Jul 4, 2004

So hot ...
pushcorn

heh

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

CaptainMeatpants posted:

i've never had to write java without android being involved so for all i know it could very well be a decent experience

it's worse

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

tef posted:

yep java is type safe alright

code:
String[] strings = new String[1];
Object[] objects = strings;
objects[0] = new Integer(1); // RUN-TIME FAILURE
and other bits http://twofoos.org/content/java-type-system-holes/

don't forget Generics.

Sapozhnik
Jan 2, 2005

Nap Ghost
what's the difference between a programming language and a DSL/toy language

a programming language has a debugger

god loving help you if you have to debug a toy language (i.e. use a toy language)

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
dick sucking lips

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Mr Dog posted:

what's the difference between a programming language and a DSL/toy language

a programming language has a debugger

god loving help you if you have to debug a toy language (i.e. use a toy language)

i prove correctness of all programs i write in functional languages so why would i need a debugger?

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

Mr Dog posted:

what's the difference between a programming language and a DSL/toy language

a programming language has a debugger

god loving help you if you have to debug a toy language (i.e. use a toy language)

general vs. domain specific. ain't no debugging that's as simple and universal as printing text.

also some languages do better with tracing than debuggers, especially languages used in time sensitive or distributed/parallel/concurrent scenarios, where debuggers are enough to gently caress things up and make things worse.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply