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
spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

tef posted:

it's really easy to implement and use? :monocle:


canvas: the revenge of postscript

am i missing the joke here idgi

Adbot
ADBOT LOVES YOU

cowboy beepboop
Feb 24, 2001

tef posted:

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

loool

Only registered members can see post attachments!

MononcQc
May 29, 2007

all this Erlang talk and I've held back from commenting and evangelizing. This is my gift to this thread for christmas.

Shaggar
Apr 26, 2006
doing anything in javascript is doing it wrong

tef
May 30, 2004

-> some l-system crap ->

spongeh posted:

am i missing the joke here idgi

canvas is easier to implement because it's a pixel drawing api. it's imperative, not declarative. i found it easier to pick up and use than svg, but i've never really used svg.


as a total aside, canvas api is loosely based on the osx drawing apis, in turn based on postscript.

Shaggar
Apr 26, 2006
i used something that outputted svg and the svg itself seemed pretty straight forward, but idk. maybe people want to use it for more complicated things than drawing scalable vector graphics.

Posting Principle
Dec 10, 2011

by Ralp

MononcQc posted:

all this Erlang talk and I've held back from commenting and evangelizing. This is my gift to this thread for christmas.

teach me your secrets

tef
May 30, 2004

-> some l-system crap ->
http://nostarch.com/erlang

double sulk
Jul 2, 2010

please send free hard copies to yosposters tia

tef
May 30, 2004

-> some l-system crap ->
http://learnyousomeerlang.com/

MononcQc
May 29, 2007

if you want a free copy you send me a PM with your e-mail address and No Starch will send copies in exchange of online reviews (blogs, Amazon, etc.)

They should be back in office around Jan 3 and reply via e-mail.

Also the link tef posted is an online version, yeah.

double sulk
Jul 2, 2010

MononcQc posted:

if you want a free copy you send me a PM with your e-mail address and No Starch will send copies in exchange of online reviews (blogs, Amazon, etc.)

They should be back in office around Jan 3 and reply via e-mail.

Also the link tef posted is an online version, yeah.

yeah i know there's the online version, but i have a better time with print copies.

what's your email? i'll send you an email because i'd be glad to do a review (5 star obv, no pms atm)

MononcQc
May 29, 2007

gucci void main posted:

yeah i know there's the online version, but i have a better time with print copies.

what's your email? i'll send you an email because i'd be glad to do a review (5 star obv, no pms atm)

mononcqc @ferd.ca

Posting Principle
Dec 10, 2011

by Ralp

MononcQc posted:

if you want a free copy you send me a PM with your e-mail address and No Starch will send copies in exchange of online reviews (blogs, Amazon, etc.)

They should be back in office around Jan 3 and reply via e-mail.

Also the link tef posted is an online version, yeah.

oh holy poo poo you're actually that guy. YOSPOS owns you own

tef
May 30, 2004

-> some l-system crap ->
i should really write an erlang program some day :3:

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

tef posted:

canvas is easier to implement because it's a pixel drawing api. it's imperative, not declarative. i found it easier to pick up and use than svg, but i've never really used svg.


as a total aside, canvas api is loosely based on the osx drawing apis, in turn based on postscript.

oh, canvas api is so simple i didnt think it couldve been based on anything, especially since postscript is basically vector. or maybe display postscript isn't idk i have a print degree not a computer science one.

and yea some sort of medium in between canvas and svg would be nice but svg is an ungodly mess

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Jerry SanDisky posted:

oh holy poo poo you're actually that guy. YOSPOS owns you own

:eyepop:

Monads is just monoids in the category of endofunctors






Also iOS dictionary recognizes endofunctors lol

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

spongeh posted:

oh, canvas api is so simple i didnt think it couldve been based on anything, especially since postscript is basically vector. or maybe display postscript isn't idk i have a print degree not a computer science one.

and yea some sort of medium in between canvas and svg would be nice but svg is an ungodly mess

There's Raphael.js or d3 depending on your needs

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

Malcolm XML posted:

There's Raphael.js or d3 depending on your needs

yea raphael is nice but when you hit some of the edge cases it can be hard to solve them. haven't tried d3 yet.

i suppose svg is fine as long as you limit yourself to a sane subset of it, otherwise you end up with stuff like http://robert.ocallahan.org/2011/11/drawing-dom-content-to-canvas.html

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

spongeh posted:

yea raphael is nice but when you hit some of the edge cases it can be hard to solve them. haven't tried d3 yet.

i suppose svg is fine as long as you limit yourself to a sane subset of it, otherwise you end up with stuff like http://robert.ocallahan.org/2011/11/drawing-dom-content-to-canvas.html


D3 is more of a dsl that ties drawing to data. Really nice in specific use cases but not that suited for arbitrary drawing

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

Malcolm XML posted:

D3 is more of a dsl that ties drawing to data. Really nice in specific use cases but not that suited for arbitrary drawing

ah so is that why its different. that didn't seem clear based on "data driven documents" and their intro talks about why other techniques are not good. their first code snippet is supposed to be the "wrong" case.

i guess that's my fault for clicking on the pretty pictures and flinging my way through the page though

double sulk
Jul 2, 2010

http://cs.gmu.edu/~sean/stuff/java-objc.html

quote:

A while back, the following posting was made by Patrick Naughton who, along with James Gosling, was responsible for much of the design of . Objective-C is an object-oriented mutant of C used NeXTSTEP and MacOS X, and also available with gcc.

Tom Gall wrote:
> Sean Luke wrote:
>> Blair MacIntyre (bm@renoir.cs.columbia.edu) wrote:

>>> BZZT. Wrong. Java was modelled on a number of languages, most
>>> importantly Modula-3 and C++.

>> Of course, it's nonsense that Java was modelled off of NewtonScript,
>> but it's even goofier to say that Java was based on Modula-3 and C++.

>> Java's *syntax* may resemble C++, but it has no similarity to C++
>> as a language. Java's chief *semantics* are dynamically-bound and
>> use single inheritance, class objects, and an extensive runtime system.
>> C++ and Modula-3 are as far away from this model as any object-oriented
>> language can be.

>> Java is clearly semantically derivative of Smalltalk and other
>> languages related to it. Most notably, NeXT's
>> Objective-C is almost uncannily similar to Java: single inheritance,
>> dynamic binding, dynamic loading, "class" objects, interfaces,
>> and now methods stored as data (a-la Java's "reflection" library),
>> all-virtual functions, you name it. It's almost weird.

> Hardly weird it was by design actually. As I remember my Java history
> Patrick Naughton the gentleman who got the ball rolling was about to
> quit Sun and join up with NeXT. He happened to be on the same
> intermural hockey team as Scott McNealy. Scott told him to hold off,
> write what he thought was wrong with Sun before he left. Patrick
> didn't leave and was one of the original Oak people. I would like
> to think his affinity for NeXTSTEP showed up in Java, with it
> having an close look and feel to that of Objective-C. (The main
> language on NeXTSTEP)

I don't generally read usenet any more (not since the good old days of
comp.graphics in the 80's...), but I happened across this article while I
was messing around with Excite Live... (a pretty cool service in
itself)...

As it turns out, Sean and Tom are both absolutely correct. Usually, this
kind of urban legend stuff turns out to be completely inaccurate, but in
this case, they are right on. When I left Sun to go to NeXT, I thought
Objective-C was the coolest thing since sliced bread, and I hated C++.
So, naturally when I stayed to start the (eventually) Java project, Obj-C
had a big influence. James Gosling, being much older than I was, he had
lots of experience with SmallTalk and Simula68, which we also borrowed
from liberally.

The other influence, was that we had lots of friends working at NeXT at
the time, whose faith in the black cube was flagging. Bruce Martin was
working on the NeXTStep 486 port, Peter King, Mike Demoney, and John
Seamons were working on the mysterious (and never shipped) NRW (NeXT RISC
Workstation, 88110???). They all joined us in late '92 - early '93 after
we had written the first version of Oak. I'm pretty sure that Java's
'interface' is a direct rip-off of Obj-C's 'protocol' which was largely
designed by these ex-NeXT'ers... Many of those strange primitive wrapper
classes, like Integer and Number came from Lee Boynton, one of the early
NeXT Obj-C class library guys who hated 'int' and 'float' types.

Another interesting side-note, (so as not to break any rules on my first
[and last]-ever posting to comp.sys.newton), John Seamons, (who happened
to be Andy Bechtolsheim's roommate at Stanford and largely reponsible for
the first ever port of Unix to the SUN-0) once did a port of Oak (Java)
to the Newton. We were in the midst of trying to do a deal with 3DO to
run as their OS/API, and we didn't have any 3DO dev systems on hand, so
John took apart an Apple Newton 100 and wired it up to a bunch of logic
analyzers, reverse engineered the interfaces and actually got some of the
original Star7 demo to run on this machine. After the 3DO deal tubed, I
think most of the code was lost to history... last I heard, John was out
in Aspen working for wnj, so you never know.

Sigh... we sure knew how to have fun in those days...

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

tef posted:

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

svg is actually faster on phones than canvas. the speed is due to the way video cards are built. the problem with canvas is that it's a bitmap. obvy svg is harder because vectors.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

spongeh posted:

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.

svg is great. the problem is its a huge spec and until very recently no one has implemented more than a chunk of it and everyones chunk was different.

canvas is stupid easy to optimize for because it's a simple pixel drawing api. svg is better, in particular with handling text.

Shaggar
Apr 26, 2006
canvas is all about making the client do everything. developers dont care if its slow as poo poo and the user doesnt understand why its slow so they just accept it.

svg lets you do more server side stuff and use traditional http things like caching and compression outside the javascript crawltime. but its browser support is random and the frameworks/languages web "developers" choose will always be bad at it. (whereas c#/java would do it effortlessly).

so guess which one will win?

Shaggar
Apr 26, 2006
should have just used xaml for everything

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

svg is great. the problem is its a huge spec and until very recently no one has implemented more than a chunk of it and everyones chunk was different.

c.f css

quote:

canvas is stupid easy to optimize for because it's a simple pixel drawing api. svg is better, in particular with handling text.

part of me wishes css actually had a proper text model (oh knuth...), but the rest of me knows it would be wishful thinking cos browser vendors don't want to reimplement tex.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

tef posted:

c.f css

css spec wasnt huge at first, it was just a casualty of the browser wars

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Shaggar posted:

canvas is all about making the client do everything. developers dont care if its slow as poo poo and the user doesnt understand why its slow so they just accept it.

svg lets you do more server side stuff and use traditional http things like caching and compression outside the javascript crawltime. but its browser support is random and the frameworks/languages web "developers" choose will always be bad at it. (whereas c#/java would do it effortlessly).

so guess which one will win?

you can push off a lot of svg to the client too

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i spent 2000 and 2001 writing client side apps in svg and javascript in anticipation of the day mozilla would support the entire spec

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
there is no :cry: large enough

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
i played around a bunch with google go & it's fun and weiord

tef
May 30, 2004

-> some l-system crap ->

rotor posted:

css spec wasnt huge at first, it was just a casualty of the browser wars

they cut it back originally, in the hope it would be implemented properly, but even in a reduced state, browser vendors are still lazy :3:

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

tef posted:

they cut it back originally, in the hope it would be implemented properly, but even in a reduced state, browser vendors are still lazy :3:

at least we finally have most of the css3 selector spec in good browsers and i think ie10

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i'd really like browsers to start shipping with copies of jquery, i mean lets have some realpolitik up in here you know

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Cocoa Crispies posted:

at least we finally have most of the css3 selector spec in good browsers and i think ie10
:catstare: css exists today because ie adopted it and boosted it against netscape's "there's a tag for that" approach, show some appreciation

Gazpacho fucked around with this message at 08:02 on Dec 27, 2012

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

rotor posted:

i'd really like browsers to start shipping with copies of jquery, i mean lets have some realpolitik up in here you know

jquery is just an animation framework, it's more important that browsers ship with faster native implementations of major framework parts than simply shipping with a bunch of versions of them

replacing sizzle.js with a native document.getElementsBySelector would be nice, and bad old browsers that never update could still use sizzle since it should use feature detection

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Cocoa Crispies posted:

jquery is just an animation framework

:raise:

krisis
Oct 25, 2003

i have a light case of asparagus.
all this talk about formats is making me wonder if there's any research out there about designing file formats that are easily implemented

no one will ever look at it, but it would make me feel better to know that research like that existed

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->
i seem to recall a thesis about making an archive format that was easy to reverse engineer but I can't find it any more

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