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
qntm
Jun 17, 2009
sound the alarm, you're going to be uncomfortably parallel

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

tef posted:

EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. ITS ERLANG: THE MOVIE AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, JOE. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME TELEPHONE OR EVEN WHEN I MESS UP TECHNIQUE. NOT MANY CAN SAY THEY ESCAPED CONSECUTIVE PROGRAMMING. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY COLLEGE CLASS AND ALL THEY DO IS PROVE PEOPLE IN COLLEGE CLASS CAN STILL BE IMMATURE JERKS. AND IVE LEARNED ALL THE LINES AND IVE LEARNED HOW TO MAKE MYSELF AND MY APARTMENT LESS LONELY BY SHOUTING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNING. THEN I LIFT

same

MononcQc
May 29, 2007

tef posted:

EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. ITS ERLANG: THE MOVIE AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, JOE. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME TELEPHONE OR EVEN WHEN I MESS UP TECHNIQUE. NOT MANY CAN SAY THEY ESCAPED CONSECUTIVE PROGRAMMING. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY COLLEGE CLASS AND ALL THEY DO IS PROVE PEOPLE IN COLLEGE CLASS CAN STILL BE IMMATURE JERKS. AND IVE LEARNED ALL THE LINES AND IVE LEARNED HOW TO MAKE MYSELF AND MY APARTMENT LESS LONELY BY SHOUTING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNING. THEN I LIFT

same but I don't lift

Soricidus
Oct 21, 2010
freedom-hating statist shill

MononcQc posted:

same but I don't lift

I assumed he was using lift in the category theory sense

MononcQc
May 29, 2007

then I lyft

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

bobbilljim posted:

haskell is the high level language designed to be harder to use than assembly

is there a PROLOG in Haskell?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
monad?

more like bronad

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

haskell is actually really easy to use

Bloody
Mar 3, 2013

Monad more like gonad

gonadic io
Feb 16, 2011

>>=

Bloody posted:

Monad more like gonad

hi

jesus WEP
Oct 17, 2004


Bloody posted:

Monad more like gonad
idk how these work either

Soricidus
Oct 21, 2010
freedom-hating statist shill

Bloody posted:

Monad more like gonad

go doesn't need monads silly

Workaday Wizard
Oct 23, 2009

by Pragmatica
c terrible programmer s:
i made some nice swing gui thing with Kotlin and i dont hate it yet

i like having a real ide and i like having multiple classes in one file (super helpful for rapid prototyping imho)

it also helps that the language is aiming to be "nicer java" instead of whatever the gently caress Scala is.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

tef posted:

EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. ITS ERLANG: THE MOVIE AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, JOE. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME TELEPHONE OR EVEN WHEN I MESS UP TECHNIQUE. NOT MANY CAN SAY THEY ESCAPED CONSECUTIVE PROGRAMMING. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY COLLEGE CLASS AND ALL THEY DO IS PROVE PEOPLE IN COLLEGE CLASS CAN STILL BE IMMATURE JERKS. AND IVE LEARNED ALL THE LINES AND IVE LEARNED HOW TO MAKE MYSELF AND MY APARTMENT LESS LONELY BY SHOUTING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNING. THEN I LIFT

chronicles of mononcqc

Stringent
Dec 22, 2004


image text goes here

St Evan Echoes posted:

idk how these work either

a gonad is like a taco

tef
May 30, 2004

-> some l-system crap ->

eschaton posted:

is there a PROLOG in Haskell?

it's called curry

tef
May 30, 2004

-> some l-system crap ->
http://en.wikipedia.org/wiki/Curry_%28programming_language%29

Notorious b.s.d.
Jan 25, 2003

by Reene

Shinku ABOOKEN posted:

it also helps that the language is aiming to be "nicer java" instead of whatever the gently caress Scala is.

scala is definitely a "nicer java." that's a core project goal

it also has about five other goals. :smith:

Bloody
Mar 3, 2013

Shinku ABOOKEN posted:

nice swing gui

lol not bloody likely

Bloody
Mar 3, 2013

Notorious b.s.d. posted:

scala is definitely a "nicer java." that's a core project goal

it also has about five other goals. :smith:

everything about scala is "it has about five other x"

Soricidus
Oct 21, 2010
freedom-hating statist shill
a gonad is a gonoid in the category of pendulofunctors

gonadic io
Feb 16, 2011

>>=

Soricidus posted:

a gonad is a gonoid in the category of pendulofunctors

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Bloody posted:

lol not bloody likely

nice self callout

compuserved
Mar 20, 2006

Nap Ghost

Soricidus posted:

a gonad is a gonoid in the category of pendulofunctors

:mrgw:

master of the sea
Apr 16, 2003

*skweeeeeee*
thos thread has made me a more knowingly terrible programmer thank you all

gonadic io
Feb 16, 2011

>>=

master of the sea posted:

thos thread has made me a more knowingly terrible programmer thank you all

that's its goal! also to occasionally help with a specific homework problem (usually involving xml workflow java bullshit, threads, or monads)

Gul Banana
Nov 28, 2003

Jabor posted:

i know this is way late but any reasonable mocking framework will let you create a mock for a (non-final) concrete class. no need to use a single-implementation interface to be able to mock it out in a test.

I've got a colleague who went through everyone's machines and changed the visual studio templates to create sealed (c# for final) classes by default
lots of IInterface in that code.

MeruFM
Jul 27, 2010

Gul Banana posted:

I've got a colleague who went through everyone's machines and changed the visual studio templates to create sealed (c# for final) classes by default
lots of IInterface in that code.

this is not a bad policy sometimes

i wish some of my predecessors had restraint wrt python. not everyone is an adult, __ didn't save everyone.

also from xx import * is the devil

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

MeruFM posted:

also from xx import * is the devil

the worst part about haskell is that the default when you write "import Farts" is basically the equivalent of "from Farts import *"

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Except with type checking you're more likely to discover the error/collision at compile time, making it not nearly as risky a wildcard python import.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Maluco Marinero posted:

Except with type checking you're more likely to discover the error/collision at compile time, making it not nearly as risky a wildcard python import.

yes the compiler can figure it out, but i think it makes the code much harder to read. you don't know by looking at a function where it's coming from

leftist heap
Feb 28, 2013

Fun Shoe
i almost never do unqualified or unquantified imports in haskell and i generally stick to qualified unless the code is going to look idiotic otherwise (like for operators, Bits..&. just looks wrong).

gonadic io
Feb 16, 2011

>>=
lmao can you imagine lens as a qualified import

Arcsech
Aug 5, 2008

fart simpson posted:

the worst part about haskell is that the default when you write "import Farts" is basically the equivalent of "from Farts import *"

this is far from the worst part about haskell

operator abuse is far worse

leftist heap
Feb 28, 2013

Fun Shoe

gonadic io posted:

lmao can you imagine lens as a qualified import

never even heard of lens and just from skimming the github it looks like something I would never in a million years use.

code:
 (%~)  is an infix alias for 'over', and the precedence lets you avoid swimming in parentheses:

ghci> _1.mapped._2.mapped %~ succ $ ([(42, "hello")],"world")
([(42, "ifmmp")],"world")
wow where has lens been all my life??

gonadic io
Feb 16, 2011

>>=
mild lens use is by far the least bad way to deal with multiple nested data tyles

gonadic io
Feb 16, 2011

>>=
i really can't be bothered to retype it all but i give an overview, justification, and apology for lens here: http://forums.somethingawful.com/showthread.php?threadid=3481275&userid=172603&perpage=40&pagenumber=3#post425466206

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

gonadic io posted:

mild lens use is by far the least bad way to deal with multiple nested data tyles

clojure seems to manage just fine with assoc-in and update-in

but I guess if you must have infix operators, sure

gonadic io
Feb 16, 2011

>>=
this code would be roughly 4 times as long, verbose, and annoying to understand without it:

code:
updateGameState :: Float -> GameState -> GameState
updateGameState dt gameState = appEndo (F.foldMap runAct (actions dt)) gameState
    where
    runAct (k,f) = if member k (_keysDown gameState) then Endo f else mempty

actions :: Float -> [(Key, GameState -> GameState)]
actions dt =
    [ (Char 'w', viewPort.vpTranslate._2 -~   5*dt)
    , (Char 's', viewPort.vpTranslate._2 +~   5*dt)
    , (Char 'a', viewPort.vpTranslate._1 +~   5*dt)
    , (Char 'd', viewPort.vpTranslate._1 -~   5*dt)
    , (Char '-', viewPort.vpScale        *~ 1-1*dt)
    , (Char '=', viewPort.vpScale        *~ 1+1*dt)
    , (Char 'r', const initialGameState)
    , (Char '.', nextTurn)


    , (SpecialKey KeyLeft     , selectedPlayer.direction %~ rotLeft )
    , (SpecialKey KeyRight    , selectedPlayer.direction %~ rotRight)

    , (MouseButton LeftButton , setSelection       )
    , (MouseButton RightButton, moveSelectedPlayer )
    ]

gonadic io fucked around with this message at 18:24 on Mar 10, 2015

Adbot
ADBOT LOVES YOU

Necc0
Jun 30, 2005

by exmarx
Broken Cake
i've just spent the past two days chasing my own tail trying to get what seemed like a super easy fix into this system only to find that whatever dipshit wrote this code decided he was going to re-calculate this one value multiple times at random places all throughout the stack. so far it's been calculated in five un-related javascript functions with different entry/exit points, in two places on the backend that I know of, and i wouldn't be loving surprised if there's a trigger in the DB calculating it as well. instead of hunting all this garbage down and fixing it i'm just throwing my own, correct, code at the very end and washing my hands of it. it's me. i'm the terrible programmer

  • Locked thread