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.
 
  • Locked thread
HoboMan
Nov 4, 2010

BUT STATIC TYPING MAKES A LANGUAGE TOO HARD

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

HoboMan posted:

BUT STATIC TYPING MAKES A LANGUAGE TOO HARD

That's why all my haskell types are just aliases to Dynamic

VikingofRock
Aug 24, 2008




eschaton posted:

what kind of stuff are you doing that breaks?

For me, it's a bunch of astronomy software. Specifically, El Capitan broke both HEASOFT (discussion of issue here, search "El Capitan") and CIAO (which was broken for 3 months while the chronically-understaffed NASA people worked on the 4.7 -> 4.8 update).

Additionally, Sierra seems to have broken stack, which is my Haskell build tool of choice.

My suspicion is that not all of these are Apple's "fault" per se (and certainly CIAO's slow response isn't), but these sorts of issues are pretty annoying and disruptive if you rely on these software packages for your daily work.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

lol if you rely on mac software for work

go play outside Skyler
Nov 7, 2005


Shaggar posted:

the syntax sucks but its still statically typed which makes it better than any p-lang

what is a p-lang? i keep seeing this expression being tossed around

also, php is a lot worse than js

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

go play outside Skyler posted:

what is a p-lang? i keep seeing this expression being tossed around

also, php is a lot worse than js

p-langs are bad languages that start with p. like perl, python, php, and ruby

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik
what is the best p-lang? "They are all bad" is a given, but which is the least bad?

Bloody
Mar 3, 2013

python

Sapozhnik
Jan 2, 2005

Nap Ghost
probably python 3

gonadic io
Feb 16, 2011

>>=

VikingofRock posted:

For me, it's a bunch of astronomy software. Specifically, El Capitan broke both HEASOFT (discussion of issue here, search "El Capitan") and CIAO (which was broken for 3 months while the chronically-understaffed NASA people worked on the 4.7 -> 4.8 update).

Additionally, Sierra seems to have broken stack, which is my Haskell build tool of choice.

My suspicion is that not all of these are Apple's "fault" per se (and certainly CIAO's slow response isn't), but these sorts of issues are pretty annoying and disruptive if you rely on these software packages for your daily work.

the latest version of Sierra made one of our dev's machines suddenly take an hour to run a set of unit tests that takes everybody else 2 mins.

now he has his own jenkins suite that he just points at whatever branch he's working on because he can't run them on his machine.

joke's on us though because that's probably a better workflow

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

gonadic io posted:

That's why all my haskell types are just aliases to Dynamic

serious question, if one were to do that, how would the resulting language compare to erlang / lisps / other dynamically typed functional languages?

gonadic io
Feb 16, 2011

>>=

go play outside Skyler posted:

what is a p-lang? i keep seeing this expression being tossed around

also, php is a lot worse than js

derivatives include f-langs (functional ocaml types) and j-langs (java, c#, maybe go?)

basically i understand j-lang to be any of these enterprisey java-y c++ with a runtime and GC and baked in OOP poo poo type langs i.e. the least bad langs to do non-hobby stuff in

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
Wait what's wrong with "on error resume next"? It's perfectly reasonable to just do:

code:
try
{
    Butt.DoWorkThatMightHaveErrors().ButWhoKnows();
}
catch (Exception) { }
next level programming strats right there

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
If code throws an exception into an empty catch block, does it make an error?

gonadic io
Feb 16, 2011

>>=

NihilCredo posted:

serious question, if one were to do that, how would the resulting language compare to erlang / lisps / other dynamically typed functional languages?

assuming that all the libs were written to expect Dynamic everywhere, it still wouldn't be great imo because there wouldn't really be any support for false-y or number-y types.

so you'd basically lose all polymorphism as far as I can see - all your static dispatch becomes

let x + y = if isSome (castInt x) then ... else if ifSome (castFloat x) then ...

disclaimer: i have not written any actual haskell in a year and never used Dynamic soooooo really i don't know

gonadic io
Feb 16, 2011

>>=
i mean sure you could start implementing all of that stuff but then what language you end up with depends entirely on what your framework allows in terms of the good old weakly-typed paradigms.

basically you end up with js lol

Soricidus
Oct 21, 2010
freedom-hating statist shill

Finster Dexter posted:

Wait what's wrong with "on error resume next"?

i hope this is an ironic question

so the way it's intended to be used is: there is a global variable called something like "err" (i forget the actual name and dgeoaf to look it up) that stores an error code. you use "on error goto next", and then do a bunch of stuff like file io that will either succeed, or fail and set the error variable, and one operation failing implies that all subsequent operations will fail. then at the end of the bunch of stuff you check the error variable to see whether it all succeeded or not, and do msgbox "welp" if it didn't i guess? idk because you have no idea how far you got or whether you've left things in a half-written state or w/e but if you cared about that kind of poo poo you probably wouldn't be using vb to begin with.

you can compare this to errno in c, which was probably a justifiable design on the pdp-11, decades before vb was invented. except c also has return values which you are expected to check instead of just plowing on through all the rest of the operations not caring whether the file has actually been created/opened successfully.

contrast: actual structured error handling, such as exceptions or option types, where ignoring the error is an explicit thing that you write out and it is obvious exactly where you are ignoring errors, and you can't accidentally leave out the catch or option check altogether if you get distracted while writing the method, and also you have the option of handling them in a sane way instead if you are not an idiot.

geeves
Sep 16, 2004

VikingofRock posted:

Why do OSX/macOS updates always seem to break stuff? I usually wait a couple months before updating so that downstream people have time to make their stuff work again with whatever the newest update is. From what I can tell it's usually linker issues breaking things.

Just wait til the next version of OSX that is a complete rewrite of the file system :v:

Actually it's already in a beta version of Sierra - but won't be in Sierra for us plebs.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Soricidus posted:

i hope this is an ironic question

so the way it's intended to be used is: there is a global variable called something like "err" (i forget the actual name and dgeoaf to look it up) that stores an error code. you use "on error goto next", and then do a bunch of stuff like file io that will either succeed, or fail and set the error variable, and one operation failing implies that all subsequent operations will fail. then at the end of the bunch of stuff you check the error variable to see whether it all succeeded or not, and do msgbox "welp" if it didn't i guess? idk because you have no idea how far you got or whether you've left things in a half-written state or w/e but if you cared about that kind of poo poo you probably wouldn't be using vb to begin with.

you can compare this to errno in c, which was probably a justifiable design on the pdp-11, decades before vb was invented. except c also has return values which you are expected to check instead of just plowing on through all the rest of the operations not caring whether the file has actually been created/opened successfully.

contrast: actual structured error handling, such as exceptions or option types, where ignoring the error is an explicit thing that you write out and it is obvious exactly where you are ignoring errors, and you can't accidentally leave out the catch or option check altogether if you get distracted while writing the method, and also you have the option of handling them in a sane way instead if you are not an idiot.

Yeah, I was being ironic, because I am dealing with a co-worker that thinks not handling errors is best practice, so I appreciate the response because I'm going to copypasta it to him in email

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Finster Dexter posted:

Wait what's wrong with "on error resume next"? It's perfectly reasonable to just do:

code:
try
{
    Butt.DoWorkThatMightHaveErrors().ButWhoKnows();
}
catch (Exception) { }
next level programming strats right there

hahahah, you wish it were merely that bad

in fact on error resume next can gently caress poo poo up in ways that you simply cannot achieve through mere empty catch blocks

guess the output:

code:
if myNullObject.IsFoo() then console.writeline("poo") else console.writeline("crap")
console.writeline("poo poo")

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
If myNullObject really is null... won't that throw an exception? I thought VB still had those.

Elias_Maluco
Aug 23, 2007
I need to sleep
Hey here is a terrible question from a terrible web programmer, I dont know where else to ask so Ill try here first:

I got a job messing with an web app made with angularjs (which I have little experience with).

Basically Im supposed to create a quiz section in the app using this thing : https://github.com/MacKentoch/ngMaterialQuizz

This thing doenst seems to be a plugin or a module or anything like that, so I have no idea how to put it inside the app.

Follow the instructions there I managed to run the thing locally, but I dont know where to go from here

Can anyone give me some clues or anything on how am I supposed to do that?

MSPain
Jul 14, 2006
that's probably not going to be very straight forward.

what's the back end of your existing app?

edit: your employer probably wont let you do this but ideally you would be able to let this thing be its own separate app rather than trying to shoehorn the two together. actually scratch that, ideally you would just be using some existing quiz service. somebody else has done this for you: https://www.qzzr.com/ for example

MSPain fucked around with this message at 21:17 on Oct 25, 2016

Elias_Maluco
Aug 23, 2007
I need to sleep

MSPain posted:

that's probably not going to be very straight forward.

what's the back end of your existing app?

edit: your employer probably wont let you do this but ideally you would be able to let this thing be its own separate app rather than trying to shoehorn the two together. actually scratch that, ideally you would just be using some existing quiz service. somebody else has done this for you: https://www.qzzr.com/ for example

The back end is an API made in PHP (Laravel)

MSPain
Jul 14, 2006
umm

MSPain
Jul 14, 2006
quit

Elias_Maluco
Aug 23, 2007
I need to sleep

that sounds like a good idea

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Finster Dexter posted:

If myNullObject really is null... won't that throw an exception? I thought VB still had those.

it will. but on error resume next swallows them. then what?

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

NihilCredo posted:

it will. but on error resume next swallows them. then what?

It prints out "poo poo", I guess.

Elias_Maluco posted:

Hey here is a terrible question from a terrible web programmer, I dont know where else to ask so Ill try here first:

I got a job messing with an web app made with angularjs (which I have little experience with).

Basically Im supposed to create a quiz section in the app using this thing : https://github.com/MacKentoch/ngMaterialQuizz

This thing doenst seems to be a plugin or a module or anything like that, so I have no idea how to put it inside the app.

Follow the instructions there I managed to run the thing locally, but I dont know where to go from here

Can anyone give me some clues or anything on how am I supposed to do that?

If it's Angular v1 then you can check out the tutorial videos out there that go over directives and how they work and how to use them in your markup, etc.

If it's Angular v2 then lol good luck mate

VikingofRock
Aug 24, 2008




geeves posted:

Just wait til the next version of OSX that is a complete rewrite of the file system :v:

Actually it's already in a beta version of Sierra - but won't be in Sierra for us plebs.

Ooh are they switching away from HFS+? Maybe to something case sensitive?

gonadic io
Feb 16, 2011

>>=

VikingofRock posted:

Ooh are they switching away from HFS+? Maybe to something case sensitive?

this is about the task_t bug which requires a large rewrite of huge amounts of very deep code

the problem was exacerbated because the goog researches gave them a short amount of time to fix it and repeatedly pushed back to extend the deadline before disclosure

at one point head apple people had a meeting with head goog people lol, basically begging not to release the bug as they hadn't patched it yet

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Finster Dexter posted:

It prints out "poo poo", I guess.

pretty sure it prints out "poo", then "poo poo"

go play outside Skyler
Nov 7, 2005


Elias_Maluco posted:

Hey here is a terrible question from a terrible web programmer, I dont know where else to ask so Ill try here first:

I got a job messing with an web app made with angularjs (which I have little experience with).

Basically Im supposed to create a quiz section in the app using this thing : https://github.com/MacKentoch/ngMaterialQuizz

This thing doenst seems to be a plugin or a module or anything like that, so I have no idea how to put it inside the app.

Follow the instructions there I managed to run the thing locally, but I dont know where to go from here

Can anyone give me some clues or anything on how am I supposed to do that?

that guy's indentation tho



e: but that's not all!

go play outside Skyler fucked around with this message at 22:07 on Oct 25, 2016

HoboMan
Nov 4, 2010

DEBUGGING RUBY ON RAILS' COMPLETELY AUTOMATIC ORM :suicide:

MSPain
Jul 14, 2006

Elias_Maluco posted:

that sounds like a good idea

options where you get paid:

1. try to reverse engineer this and cram it into your existing angular code.

2. you might be able to leave this quiz thing in a totally different directory for development, and then copy the app.bundle.js it generates (and some of the other assets) into your existing app, and only include it on a page you create specifically for quizzes. it seems like you just need to modify the models to change the quiz questions. hooking it up to your api to save the results appears to be completely on you to figure out, though.

3. create a separate app just for quizzes in node or whatever. link to this new app from your existing one. some people might call this a ~ micro service ~

4. use a service that already exists, but might include branding or cost you money.

these options are in descending order of garbage you'll have to deal with.

MSPain
Jul 14, 2006

go play outside Skyler posted:

that guy's indentation tho

yeah honestly, does it have to be this quiz thing?
it doesn't appear to be like a super popular repo.
it doesn't plug into anything easily (you already picked up on this).
it's all in es6 which means it wont work on poo poo browsers.
the dude who made it has made some questionable style choices:
code:

/* global angular */
import homeController, {
	HOME_CONTROLLER_NAME
}											from './app.home.controller';

const APP_HOME_MODULE_NAME = 'app.home.module';

export default angular
								.module(APP_HOME_MODULE_NAME, [])
								.controller(HOME_CONTROLLER_NAME, homeController);

gonadic io
Feb 16, 2011

>>=
the lesson here is that when given suspiciously specific requirements, always have a discussion with the person asking and try to work out what they want, not what they're asking for. if you just blithly do what they asked for you are probably making extra work for yourself later on - talk to them!

this is a lesson i have seriously had beaten over my head multiple times these last few weeks

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

HoboMan posted:

DEBUGGING RUBY ON RAILS' COMPLETELY AUTOMATIC ORM :suicide:

One of the first things Twitter did to optimize their platform (built on RoR) was to rip out the ORM.

Bloody
Mar 3, 2013

then they ripped out the ror

Adbot
ADBOT LOVES YOU

MSPain
Jul 14, 2006

gonadic io posted:

the lesson here is that when given suspiciously specific requirements, always have a discussion with the person asking and try to work out what they want, not what they're asking for. if you just blithly do what they asked for you are probably making extra work for yourself later on - talk to them!

this is a lesson i have seriously had beaten over my head multiple times these last few weeks

gospel

  • Locked thread