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
Posting Principle
Dec 10, 2011

by Ralp
my new years resolution is to build something cool with erlang

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

turing tarpit supremacy

penus de milo
Mar 9, 2002

CHAR CHAR
hurrlang

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post

tef posted:

eh you sorta come to terms with it and find new ways to make yourself unhappy


It is like your desire to be better makes you unhappy regardless of improvements

quoth the buddha, nevermore

double sulk
Jul 2, 2010

2013: the year to finally learn java???

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
sure learn the language that is so pathetic it cost google untold billions to get working on phones

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

0xB16B00B5 posted:

sure learn the language that is so pathetic it cost google untold billions to get working on phones

they shoulda fuckin used c++ and qt imho

qntm
Jun 17, 2009

tef posted:

"conspiracy of optimism"

nice

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

rotor posted:

they shoulda fuckin used c++ and qt imho

What's the backstory on this? Was Java especially horrible in mysterious ways? Wouldn't some of the same problems have come up no matter what language they tried jamming into a little bitty phone?

Shaggar
Apr 26, 2006
oracle wrote their own (bad) jvm instead of licensing one from sun/oracle.

Posting Principle
Dec 10, 2011

by Ralp

gucci void main posted:

2013: the year to finally learn java???

gently caress the haters java owns (mostly)

rotor posted:

they shoulda fuckin used c++ and qt imho

unironically this

Shaggar
Apr 26, 2006
c++ is old and bad and so is qt.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

prefect posted:

What's the backstory on this? Was Java especially horrible in mysterious ways? Wouldn't some of the same problems have come up no matter what language they tried jamming into a little bitty phone?


no they had to gently caress around with it until it didn't violate any patents (lol good job on that one goog)

tef
May 30, 2004

-> some l-system crap ->

Cocoa Crispies posted:

a language that can't fight back is like a car where you can't disable traction control, cool if all you want to do is boring stuff slowly

really, java is a language where you have to go against the grain of it, to make it work well.

look at 'effective java 2nd ed'. you have to go out of your way to defensively copy, singletons are hard (most get it wrong), you have to opt in to final, rather than opt-out. the type system has holes in it, static members are a total hack.

i am led to believe that the c# team learned from this and made a language that made the right thing less hard to do, and made bad things harder.

tef
May 30, 2004

-> some l-system crap ->

Jerry SanDisky posted:

my new years resolution is to build something cool with erlang

after a while you will click about the following erlang things


process dictionaries are a necessary evil, but you can avoid them
instead of worrying about objects, you worry about processes.
supervision is incredible and otp is the best bit of erlang
string handling is *still* painful beyond belief, binaries less so
processes are *entirely* state machines, and tail recursion means you don't worry about stack growth.


so where erlang works is handling opaque lumps of data, with a bunch of state machines that can copy information between them, organized in a tree.

so you will have to write some sort of network service if you want to understand why erlang is need.

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

they shoulda fuckin used c++ and qt imho

yes native compilation and more control over object lifetimes

but oh god qt/c++. please no. not to say it would be much worse but it certainly wouldn't be much better

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

tef posted:

so you will have to write some sort of network service if you want to understand why erlang is need.

write a Really Good irc server, something at least as good as http://github.com/sstephenson/hector

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i liked qt :snobon:

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

no they had to gently caress around with it until it didn't violate any patents (lol good job on that one goog)

register machines are superior, eat it forth-havers

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
:snobon: brought to you by old eyes and lovely osx font rendering

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

rotor posted:

:snobon: brought to you by old eyes and lovely osx font rendering

ban for rotor is old joke

oh wait they repealed that

as u were

Posting Principle
Dec 10, 2011

by Ralp

tef posted:

after a while you will click about the following erlang things


process dictionaries are a necessary evil, but you can avoid them
instead of worrying about objects, you worry about processes.
supervision is incredible and otp is the best bit of erlang
string handling is *still* painful beyond belief, binaries less so
processes are *entirely* state machines, and tail recursion means you don't worry about stack growth.


so where erlang works is handling opaque lumps of data, with a bunch of state machines that can copy information between them, organized in a tree.

so you will have to write some sort of network service if you want to understand why erlang is need.

thank you for this, I have some ideas kicking around so I will look into all this :shobon:

Cocoa Crispies posted:

write a Really Good irc server, something at least as good as http://github.com/sstephenson/hector

I was thinking irc or xmpp or something like that

rotor posted:

i liked qt :snobon:

qt is literally the best cross platform gui library

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

i liked qt :snobon:

qt is nice but it feels like 'we've found the least worst way of doing guis'.

the signal/slot system works well, but only if you never *ever* change the links between them, because there be dragons. i've managed to introduce race conditions by being an idiot.

the parent/child relationships on objects are also fantastic for guis, as it avoids having to do stop the world memory management.

sure enough, qt is a great library and platform, and it is possibly one of the nicest i've used in terms of cross platform performance.

thing is, it has to create a language atop c++ in order to work, and therin lies my complaint.

qt is a language struggling to break out of the existing ones, and has to warp the fabric of the host language to fit.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i mean if you're not gonna do something native then dont be halfassed about it and use java, go all the way and use javascript/html as per webos

2nd Rate Poster
Mar 25, 2004

i started a joke

Jerry SanDisky posted:

I was thinking irc or xmpp or something like that

An irc bot is the erlang rite of passage.

tef
May 30, 2004

-> some l-system crap ->

Jerry SanDisky posted:

thank you for this, I have some ideas kicking around so I will look into all this :shobon:

i'm like a broken record, but really 'a bunch of state machines sending messages to another, in a supervision tree' is really the essence of how erlang works. going against this lies pain and suffering.

http://www.erlang.org/download/armstrong_thesis_2003.pdf

joe armstrong's thesis is an *excellent* read about the intent behind the design of erlang, and explores the concepts in detail. this won't help you write erlang programs, but will help you understand erlang.

it also cites one of my other favourite theses - microtypography extensions to latex. :3:

quote:

I was thinking irc or xmpp or something like that

irc will be easier because it is a text based protocol. xmpp is possible (c.f ejabberd), but xml handling and mashing is not really performant in erlang without pushing out to native functions.

(using native functions loses you the safety and isolation that erlang craves, in return for speed]

quote:

qt is literally the best cross platform gui library

tbh i kinda have a soft spot for html/css/js as a ui system. no wonder microsoft cribbed the idea of declarative interfaces for xaml :v:

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

i mean if you're not gonna do something native then dont be halfassed about it and use java, go all the way and use javascript/html as per webos

this.

obviously the solution is to write things in javascript and call out to native client binaries.

double sulk
Jul 2, 2010

i need to learn js proper, i am very bad at it (much like my posting)

Posting Principle
Dec 10, 2011

by Ralp

gucci void main posted:

i need to learn js proper, i am very bad at it (much like my posting)

same, i haven't used js since school

0xB16B00B5
Aug 24, 2006

by Y Kant Ozma Post
just learn jquery theres no point knowing the awfulness that lies beneath

tef
May 30, 2004

-> some l-system crap ->

2nd Rate Poster posted:

An irc bot is the erlang rite of passage.

so mr sandisky, you should write an irc proxy or bouncer in erlang.

start by write something that connects to an irc room and says hello.

code:
$ telnet irc.synirc.net 6667
< :envy.il.us.synirc.net NOTICE AUTH :*** Looking up your hostname...
< :envy.il.us.synirc.net NOTICE AUTH :*** Checking ident...
< :envy.il.us.synirc.net NOTICE AUTH :*** Found your hostname

> NICK buttlord

< :envy.il.us.synirc.net NOTICE AUTH :*** No ident response; username prefixed with ~
< PING :994F0A2F

> PONG :994F0A2F
> USER butts 0 * :butts

< :envy.il.us.synirc.net 001 buttlord :Welcome to the synIRC IRC Network buttlord!~butts@buttlord.org
...

tef fucked around with this message at 02:03 on Dec 27, 2012

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

tef posted:

tbh i kinda have a soft spot for html/css/js as a ui system. no wonder microsoft cribbed the idea of declarative interfaces for xaml :v:

same except use SVG so you have decent type handling facilities and you're not tied to some horrible leftover crap designed to display documentation.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





tef posted:

process dictionaries are a necessary evil, but you can avoid them

don't listen to this man. never use the process dict. it's unconstrained process global state and leads to unreadable and unuseable code. the same goes for all those bullshit 'object oriented erlang' hacks like tuple modules, parameterized modules and even opaque data types. if you can't express it as a compound of lists, tuples, atoms, numbers and binaries you need to rethink it. most of the stdlib is bullshit too, especially the dict, gb_trees and sets modules. use proplists

what makes erlang amazing is pattern matching and unification. anything that gets in the way of that should be avoided

gabensraum
Sep 16, 2003


LOAD "NICE!",8,1
any site i make starts with jquery-min included from a cdn with a local fallback copy. obv if i haven't used it i'll delete the reference before it goes live but i used js raw for years and i'm never going back.

tef posted:

i am led to believe that the c# team learned from this [...] and made bad things harder.

i give it a good crack

tef
May 30, 2004

-> some l-system crap ->

the talent deficit posted:

don't listen to this man. never use the process dict.

this would be better rule of thumb

quote:

it's unconstrained process global state and leads to unreadable and unuseable code. the same goes for all those bullshit 'object oriented erlang' hacks like tuple modules, parameterized modules and even opaque data types. if you can't express it as a compound of lists, tuples, atoms, numbers and binaries you need to rethink it. most of the stdlib is bullshit too, especially the dict, gb_trees and sets modules. use proplists

man it's like your channeling o'keefe

quote:

what makes erlang amazing is pattern matching and unification. anything that gets in the way of that should be avoided

if only it had resolution :smith:

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

same except use SVG so you have decent type handling facilities and you're not tied to some horrible leftover crap designed to display documentation.

have you seen pdf.js ?

they tried to use svg but it was slower than canvas and they'd have to reimplement text selection atop

https://people.mozilla.com/%7Ecjones/PDF.js-mozilla-vision-japan-2012.pdf

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





tef posted:

man it's like your channeling o'keefe

if only it had resolution :smith:

rok is basically my idol. maybe mononqc will tell us about the book review he got from him

tef
May 30, 2004

-> some l-system crap ->
he would look on my posts and despair


his book, the craft of prolog, is magical

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION
for as much as tef likes to be an idealistic pessimist about the lack of perfection, svg is for the most part really bad and anything extensively using svg is an absolute mess. there's a reason canvas has came about and has seen a hell of a lot more optimization from browser vendors than svg has.

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
it's really easy to implement and use? :monocle:


canvas: the revenge of postscript

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