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
crazypenguin
Mar 9, 2005
nothing witty here, move along
I don't get the Haskell runtime type checking thingy. why do you want it?

I'm not knocking on dynamic types here, I just legit don't know what you'd want it in Haskell. I can't remember a single type error I've ever gotten from Haskell that wouldn't just be an immediate crash when that code got run.

the wiki just says its sometimes useful during development, but doesn't actually say when. so... is it just a way to not comment out broken code you don't intend to run at the moment?

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Notorious b.s.d. posted:

the task that created javascript was "we need a scripting language in four weeks, GO"

the problem to be solved was that some business idiot had promised another business idiot a vaguely defined feature. js was the result.

and a late requirement that it look like java and not lisp as originally intended

MononcQc
May 29, 2007

Notorious b.s.d. posted:

perl specifically cannot be parsed without executing it.

type checking comes after you solve the halting problem

afaict, it is not even a strict vs non-strict thing. 'use strict' just turns off some of perl's irritating features to quash common sources of bugs. (e.g. accidental use of uninitialized variables)

Yeah that's the article I had in mind, but couldn't find it yesterday. There are other very obvious (and ridiculous) cases, like PHP being able to include scripts from URLs that are not valid now but will be at eval time (a PHP include is just eval('?>' . file_get_contents($file) . '<?php;');). I'm not sure what kind of acts of self-violence this would force on someone wanting to type check PHP when you get arbitrary code execution (potentially) from untrusted sources like that.

E: I guess you just make it a best effort according to what you can fetch at that time and run with it. Then cry because you're trying to type check PHP.

MononcQc fucked around with this message at 17:49 on Mar 5, 2013

Opinion Haver
Apr 9, 2007

crazypenguin posted:

the wiki just says its sometimes useful during development, but doesn't actually say when. so... is it just a way to not comment out broken code you don't intend to run at the moment?

this is one use for it, yeah. obviously if you actually use it in real code you're an idiot but if you can't get the types to match and you have no clue why firing up ghci with -fdefer-type-errors and playing around with types is a good way to figure out what's going on

Nomnom Cookie
Aug 30, 2009



MononcQc posted:

Yeah that's the article I had in mind, but couldn't find it yesterday. There are other very obvious (and ridiculous) cases, like PHP being able to include scripts from URLs that are not valid now but will be at eval time (a PHP include is just eval('?>' . file_get_contents($file) . '<?php;');). I'm not sure what kind of acts of self-violence this would force on someone wanting to type check PHP when you get arbitrary code execution (potentially) from untrusted sources like that.

E: I guess you just make it a best effort according to what you can fetch at that time and run with it. Then cry because you're trying to type check PHP.

PHP coerces opportunistically

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

Yeah that's the article I had in mind, but couldn't find it yesterday. There are other very obvious (and ridiculous) cases, like PHP being able to include scripts from URLs that are not valid now but will be at eval time (a PHP include is just eval('?>' . file_get_contents($file) . '<?php;');). I'm not sure what kind of acts of self-violence this would force on someone wanting to type check PHP when you get arbitrary code execution from untrusted sources like that.

php and perl5 both suffer from naive choices made early in development (php 2/3, perl 4). the origin stories on their warts are very similar. they differ only in magnitude.

perl5's naive choices include things like BEGIN blocks, exceptions as strings, and really hacky UTF-8 support. you have probably never heard of these as misfeatures because they never affected your work, despite being truly deranged choices in language design.

php's naive defects, on the other hand, will touch the developer every single day. which is why people rage about php and more or less give perl a free pass (except "LOL SIGILS WHO CAN READ THAT!!??")

Notorious b.s.d. fucked around with this message at 17:55 on Mar 5, 2013

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Cybernetic Vermin posted:

if you can run your java system with the default permgen size then you aren't cglib-proxy-aop'ing hard enough

or enough web services! :argh:

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

MononcQc posted:

cry because you're trying to type check PHP.

reminder that comparing two strings in php will give you wrong answers if the strings start with more digits than php's floating point type supports

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
Today i'm writing a parser to read config files that are 50% YAML-esque but not YAML, and 50% XML-esque but not XML.

It's really fun as gently caress

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Notorious b.s.d. posted:

php's naive defects, on the other hand, will touch the developer every single day. which is why people rage about php and more or less give perl a free pass (except "LOL SIGILS WHO CAN READ THAT!!??")

what "naive defects" are these? i write php every day and rarely ever bump into anything that can be blamed on bad language design

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Tiny Bug Child posted:

what "naive defects" are these? i write php every day and rarely ever bump into anything that can be blamed on bad language design

yeah i wouldn't blame the language for things like plaintext passwords.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
ofc not. that's an unfortunate, but necessary decision we made because of how often our customers have trouble logging in or forget their passwords

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
why can't you send a reset link to their email

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
b/c they'd be too stupid to use it. it's way easier to just go "here's your password. click this link and you get logged in instantly."

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
i mean i guess it's pretty much just :freemarket: at that point, yeah

MononcQc
May 29, 2007

have you considered letting them log on with just their username?

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Notorious b.s.d. posted:

the task that created javascript was "we need a scripting language in four weeks, GO"

this is how all great software is initially produced.

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

rotor posted:

this is how all great software is initially produced.

time to market pretty much trumps all other considerations (except it has to at least somewhat work)

tef
May 30, 2004

-> some l-system crap ->

crazypenguin posted:

I don't get the Haskell runtime type checking thingy. why do you want it?

I'm not knocking on dynamic types here, I just legit don't know what you'd want it in Haskell. I can't remember a single type error I've ever gotten from Haskell that wouldn't just be an immediate crash when that code got run.

the wiki just says its sometimes useful during development, but doesn't actually say when. so... is it just a way to not comment out broken code you don't intend to run at the moment?

if you're going to turn up late to the party, at least catch read stuff, or perhaps, you might understand that not everyone makes the same broken errors as you

the last time it came up over a year ago, it has similar responses and similar explanations

tef posted:

I think my favourite thing (of late) to come out of the haskell swamp is this
http://research.microsoft.com/en-us/people/dimitris/icfp12.pdf

(they've found a way to compile code with type errors, almost as if you were using a dynamic language :q:)

Internaut! posted:

who are these people writing haskell code that's somehow so full of type errors it's desirable to turn off type checking

tef posted:

and it isn't turning off type checking :confused:, it's deferring type errors to runtime

they cite something for java, DuctileJ, which they say goes over the rationale in more detail

http://www.cs.washington.edu/homes/mernst/pubs/ductile-icse2011.pdf



kids today, can't even read the abstract let alone the title of a paper.

MeruFM
Jul 27, 2010
8 pages of dynamic/static typing after 4 pages of operator overloading

just use your flavored lint-like with -verbose -Verbose -v -V options on if you cannot handle the var/$/Obj

Zombywuf
Mar 29, 2008

Or just commit code full of typos :V

JewKiller 3000
Nov 28, 2006

by Lowtax

tef posted:

i really hope you are c/p from hacker news, if not, why don't you got post there.

4 completely useless content-free tef posts in a row? wow i must have hit a nerve

JewKiller 3000 fucked around with this message at 20:09 on Mar 5, 2013

GameCube
Nov 21, 2006

anybody post this yet https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920

the list of method names in their app doesn't fit in 5 MB

instead of fixing the facebook app, they hack dalvik from the app

GameCube fucked around with this message at 20:19 on Mar 5, 2013

Cybernetic Vermin
Apr 18, 2005

Werthog 95 posted:

anybody post this yet https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920

the list of method names in their app doesn't fit in 5 MB

instead of fixing the facebook app, they hack dalvik from the app

other parts of the story: scala compiles its collections api into a web of cross-inheriting interfaces, when an android app is installed on your phone an analysis of the bytecode is run, which allocates a static piece of memory for every method in every interface, with duplicates if the interface inherits the same method from different places. with the scala setup this turns into a lot of useless duplicates. this allocation happens in a fixed 5-megabyte buffer for some reason

not to defend facebook, but it is a bit more fun when you have compound stupidity like that

Workaday Wizard
Oct 23, 2009

by Pragmatica
i use a keyboard to type my code hth

Sang-
Nov 2, 2007

Werthog 95 posted:

anybody post this yet https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920

the list of method names in their app doesn't fit in 5 MB

instead of fixing the facebook app, they hack dalvik from the app

Yeah, the actual problem is that Dalvik duplicates methods for every interface. So if you have

code:
interface A {
  void doStuff();
}

interface B {
  void doStuff();
}

final class B implements A, B {
  void doStuff() {
  }
}
doStuff is duplicated 3 times because dalvik is terrible

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Sang- posted:

Yeah, the actual problem is that Dalvik duplicates methods for every interface. So if you have

code:
interface A {
  void doStuff();
}

interface B {
  void doStuff();
}

final class C implements A, B {
  void doStuff() {
  }
}
doStuff is duplicated 3 times because dalvik is terrible
oh lordy it has to because if you are aware of interface A and you get an instance of C your C#doStuff will be A#doStuff and not B#doStuff right?

edit: wait no those are interface contracts not inheritance, there is no A#doStuff, just C#doStuff

hobbesmaster
Jan 28, 2008

Sang- posted:

Yeah, the actual problem is that Dalvik duplicates methods for every interface. So if you have

code:
interface A {
  void doStuff();
}

interface B {
  void doStuff();
}

final class B implements A, B {
  void doStuff() {
  }
}
doStuff is duplicated 3 times because dalvik is terrible

if only there was some way to create a table containing points to the appropriate method for virtual methods in a class. a virtual table if you will

Bream
Feb 3, 2013

Farmer's Barket

Codecademy posted:

Flex your superpowers!
Start the month off right with new lessons in PHP, tools to talk to Twitter, tips on diving deep into code, and an inspiring video with some of today's biggest names on why coding is the new superpower. Enjoy!

Try a new language: PHP
Start learning PHP with our introduction to this server-side language, used to create apps like Facebook and Wikipedia. (Already know PHP? Contribute to the next round of lessons.)
Learn how to make a Twitter app
With a little bit of Ruby you can search, send and read tweets from Twitter using its API, or "Application Programming Interace." We’ll show you how.

On a serious note, does anyone have recommendations regarding CI with Mercurial? Also why is CI one of those things that millions of Joel Spolskys everywhere offers their own version of?

crazypenguin
Mar 9, 2005
nothing witty here, move along

yaoi prophet posted:

this is one use for it, yeah. obviously if you actually use it in real code you're an idiot but if you can't get the types to match and you have no clue why firing up ghci with -fdefer-type-errors and playing around with types is a good way to figure out what's going on

that makes sense. you'd get some of that from an IDE that could tell you what types were inferred for things right?

tef posted:

if you're going to turn up late to the party, at least catch read stuff, or perhaps, you might understand that not everyone makes the same broken errors as you

the last time it came up over a year ago, it has similar responses and similar explanations

yeah, I'm guilty of looking at their wiki for an explanation, rather than the papers. Those papers do, eventually, get into decent motivation.

The part that had me confused is that Haskell doesn't have real late-binding, like OO languages do with dynamic dispatch. So in the DuctileJ paper, on page 2 where they lay out their principles, Haskell doesn't get any benefit from principle #2.

That is, a type incorrect DuctileJ program can hit a (static) type error and figure out everything is okay at runtime, and just keep running. That doesn't happen at all for Haskell. In Haskell, if you try to run that code that has the static type error, the program just dies with the type error, always.

But anyway, it makes sense now.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Sang- posted:

Yeah, the actual problem is that Dalvik duplicates methods for every interface. So if you have

code:
interface A {
  void doStuff();
}

interface B {
  void doStuff();
}

final class B implements A, B {
  void doStuff() {
  }
}
doStuff is duplicated 3 times because dalvik is terrible


oh, ok, so instead of 3 million methods they just have 1 million methods, that's reasonable i guess. yep, Dalviks fault.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Bream posted:

On a serious note, does anyone have recommendations regarding CI with Mercurial? Also why is CI one of those things that millions of Joel Spolskys everywhere offers their own version of?

because CI ties closely to business processes and no ones business process is that same. see also: bugtrackers, project management software

Zombywuf
Mar 29, 2008

rotor posted:

because CI ties closely to business processes and no ones business process is that same. see also: bugtrackers, project management software

tl;dr: CI software is awful

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
jenkins is probably the least awful that you can run yourself but it's still awful

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
just write your own, it's not hard. most of the ci things i've seen are just glorified build farms anyway.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Cocoa Crispies posted:

jenkins is probably the least awful that you can run yourself but it's still awful

Zombywuf
Mar 29, 2008

Cocoa Crispies posted:

jenkins is probably the least awful that you can run yourself but it's still awful


rotor posted:

just write your own, it's not hard. most of the ci things i've seen are just glorified build farms anyway.

Jenkins is basically a pretty front end on a bunch of build scripts you write yourself.

Nomnom Cookie
Aug 30, 2009



Zombywuf posted:

Jenkins is basically a pretty front end on a bunch of build scripts you write yourself.

yes that is what a CI server should be. say it with me: repeatable builds

Zombywuf
Mar 29, 2008

Nomnom Cookie posted:

yes that is what a CI server should be. say it with me: repeatable builds

The rest of Jenkins is a bunch of broken plugins, some of which might spin up a bunch of EC2 instances and then crash leaving them floating about stranded and untagged. Not that I'm bitter.

Adbot
ADBOT LOVES YOU

Zombywuf
Mar 29, 2008

Werthog 95 posted:

anybody post this yet https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920

the list of method names in their app doesn't fit in 5 MB

instead of fixing the facebook app, they hack dalvik from the app

The comments on that are ... good.

My world is turned upside down.

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