Welcome, Guest. Please login or register.
November 14, 2018, 12:16:33 pm

ballp.it is the community forum for The F Plus.

You're only seeing part of the forum conversation. To see more, register for an account. This will give you read-only access to nearly all the forums.

Topic: Thread.setTitle("Programmers Anonymous");  (Read 11995 times)

Gyro

  • touched fuzzy, got dizzy
  • Paid
  • 827
  • 54
Thread.setTitle("Programmers Anonymous");
« Reply #15 on: July 03, 2016, 12:52:02 pm »
There was a study done that found that keyword-based syntax and indentation-based syntax were easier for new programmers to learn: https://www.quorumlanguage.com/evidence/evidence.pdf. (the full paper is unfortunately hard to find online, but from what I remember from reading it their methodology was super fair)

That's pretty legitimate, but out of the two I'd still choose indentation-based syntax by a landslide (and I do, by using Moonscript over pure Lua). The difference is that proper indentation is something you should be doing anyway. No extra typing. Less typing than curly braces, in fact, if you're already indenting that way!

So yeah I kinda like Python.

e: Thanks for the study, by the way. That's pretty informative.
« Last Edit: July 03, 2016, 12:53:48 pm by Gyro »

Lemon

  • (I have no sex virus)
  • Administrator
  • Miss Priss, I'd like to piss on your coat.
  • 3,204
  • 375
Thread.setTitle("Programmers Anonymous");
« Reply #16 on: July 03, 2016, 06:20:09 pm »
I like indentation-based stuff a lot, but I don't get to use it much. I do a lot of writing in Jade (indent based HTML language), and that system just forces me to think in systems and dependencies, and I (sometimes) come out with cleaner code as a result. Always quicker to write.

I do some other stuff in yml, which is terse and that's nice, but I feel like the syntax is dumb and my yml files never work as well as I think they should.
I keep meaning to teach myself coffeescript to eliminate all of the fluff that JavaScript forces into a person, but I never find the time. Hopefully this year.

Zekka

  • I AM IN INTO MATHEMATICAL CALCULATIONS AND MANY METHODS USED IN THE STOCK MARKET
  • Paid
    • 785
    • 56
Thread.setTitle("Programmers Anonymous");
« Reply #17 on: July 03, 2016, 07:24:52 pm »
I like indentation-based stuff a lot, but I don't get to use it much. I do a lot of writing in Jade (indent based HTML language), and that system just forces me to think in systems and dependencies, and I (sometimes) come out with cleaner code as a result. Always quicker to write.

I do some other stuff in yml, which is terse and that's nice, but I feel like the syntax is dumb and my yml files never work as well as I think they should.
I keep meaning to teach myself coffeescript to eliminate all of the fluff that JavaScript forces into a person, but I never find the time. Hopefully this year.

The improvements Coffeescript introduces (at least as far as I remember) are pretty conservative -- you're a reasonably intelligent person so I doubt it would take you longer than a week to learn to use it. The annoying bit is that you have to manually recompile (or tell your build system to recompile automatically) when you use it -- but it sounds like you already use tools that have that workflow so probably you have no reason to care.

Lemon

  • (I have no sex virus)
  • Administrator
  • Miss Priss, I'd like to piss on your coat.
  • 3,204
  • 375
Thread.setTitle("Programmers Anonymous");
« Reply #18 on: July 03, 2016, 07:44:43 pm »
Yeah, I precompile both my css and my html, so it makes sense to do it with js as well. Results don't seem quite as interesting, but if I can just avoid that "everything breaks if the last item in an array has a comma after it" problem, my life already improves a little.

Thanks for thinking I'm reasonably intelligent though!

Zekka

  • I AM IN INTO MATHEMATICAL CALCULATIONS AND MANY METHODS USED IN THE STOCK MARKET
  • Paid
    • 785
    • 56
Thread.setTitle("Programmers Anonymous");
« Reply #19 on: July 03, 2016, 08:00:18 pm »
Thanks for thinking I'm reasonably intelligent though!

If you come into this thread and post a CoffeeScript question I'll probably have to rethink that assessment.
Ambious

Nifty Nif

  • Big Dumb Slimy Monster
  • Paid
  • powerful and can be dangreous
  • 814
  • 51
Thread.setTitle("Programmers Anonymous");
« Reply #20 on: July 04, 2016, 02:47:55 pm »
On the topic of compiling JS, I'm using React for the first time, and I am rethinking so many of my life choices at this moment.  I really wish they had more docs on their API calls because I don't like using their JSX syntax.  I'm also having to Browserify the Node underneath, which is a real pain in the ass, but it works okay I guess.  I'm probably going about this all wrong, but my main problem is with the lack of documentation on the api calls.  I can mostly pick them up, but for a non-javascripty person they're a little too loose and free to intuit.

turkey smoothie

  • super hungay
  • Paid
    • 49
    • 13
Thread.setTitle("Programmers Anonymous");
« Reply #21 on: July 04, 2016, 07:34:15 pm »
I keep meaning to teach myself coffeescript to eliminate all of the fluff that JavaScript forces into a person, but I never find the time. Hopefully this year.

So, my opinion only but if you're gonna dive in on coffeescript, and you're perfectly okay with compiling JS, forget about coffeescript. Learn all the new ES6 features and start writing ES6 and transpiling it back to ES5 if you're deploying to the internet at large.

ES6 has lots of nifty features Coffeescript will give you, and you have the added bonus of writing code that works without compilation in modern JS environments. Just my two cents. At my last job we used Typescript, and really dug it, but my current team owns a greenfield app that we did in react with ES6 over the past year and it's been a really, really brilliant transition (and JSX aside, we're writing vanilla JS that conforms to the ES specification so should work indefinitely as support for it/work on it will never be dropped.)
Nifty Nif

nuffkins, of all people,

  • Paid
  • much ado about nuffkins
    • 74
    • 13
Thread.setTitle("Programmers Anonymous");
« Reply #22 on: July 21, 2016, 03:35:57 pm »
Today my prof explained that sure C++ lambda isn't really lambda, but it can do most things actual lambda can.

Problem: that assumes functional programming purists care about doing things.

Zekka

  • I AM IN INTO MATHEMATICAL CALCULATIONS AND MANY METHODS USED IN THE STOCK MARKET
  • Paid
    • 785
    • 56
Thread.setTitle("Programmers Anonymous");
« Reply #23 on: July 21, 2016, 03:59:07 pm »
Today my prof explained that sure C++ lambda isn't really lambda, but it can do most things actual lambda can.

Problem: that assumes functional programming purists care about doing things.
What's not real about it?

nuffkins, of all people,

  • Paid
  • much ado about nuffkins
    • 74
    • 13
Thread.setTitle("Programmers Anonymous");
« Reply #24 on: July 21, 2016, 06:25:36 pm »
What's not real about it?

Functions aren't first class data in C++.

Zekka

  • I AM IN INTO MATHEMATICAL CALCULATIONS AND MANY METHODS USED IN THE STOCK MARKET
  • Paid
    • 785
    • 56
Thread.setTitle("Programmers Anonymous");
« Reply #25 on: July 21, 2016, 06:30:40 pm »
What's not real about it?

Functions aren't first class data in C++.
Why not? Aren't lambdas in C++ just function pointers paired with the parts of the scope that are already filled? I'm not sure what other properties you would expect a function-as-value to have.

IIRC function pointer plus scope pointer is basically how Haskell or your other purist functional languages represent them, unless static monster cockysis proves that the closure doesn't last any longer than the creating scope.
nuffkins, of all people,

turkey smoothie

  • super hungay
  • Paid
    • 49
    • 13
Thread.setTitle("Programmers Anonymous");
« Reply #26 on: July 22, 2016, 10:02:46 am »
unless static monster cockysis

OH MY GOD[/glow]
Nifty Nif chai tea latte

A Whirring, Bone-White Gleech

  • fact-lord
  • Paid
  • I was in first place, you whore!
  • 725
  • 156
Thread.setTitle("Programmers Anonymous");
« Reply #27 on: July 22, 2016, 10:56:03 am »
Problem: that assumes functional programming purists care about doing things.

Languages with good functional programming support make setting up callbacks (in graphical programming, for example) much, much easier.  Compare the following:

Python 3:
Code: [Select]
button = tkinter.Button(root, text = "click me", command = lambda: print("clicked"))

Qt/C++
Code: [Select]
    QObject::connect(ui->pushButton, &QPushButton::clicked, [=](bool clicked) {
        std::cout << "clicked" << std::endl;
    });

Java Swing (old-style)
Code: [Select]
        button.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    System.out.println("clicked");
                }
            });

Consider how painful something like node.js would be, if every time you called an async function, you had to use the Java syntax.
« Last Edit: July 22, 2016, 10:58:31 am by Der Trommelngleech »

Gyro

  • touched fuzzy, got dizzy
  • Paid
  • 827
  • 54
Thread.setTitle("Programmers Anonymous");
« Reply #28 on: July 22, 2016, 12:06:12 pm »
It seems to me that, when people talk about functional programming, they're talking about two different things. There are languages with good functional programming support, like Python 3, Scala, and Rust. Then there are pure functional languages where mutable state does not exist outside of monads, like Haskell and (I think) Erlang. I'm pretty sure nuffkins was complaining about proponents of the latter.

Of course, in their defense, Erlang has been used to build practical things a bunch of times. It was born out of a desire to build telephone exchanges. So, you've got at least one functional programming language that people have used to solve real problems.

Pure functional languages still weird me out and I have no idea how to build anything in any of them. Take my opinion with a grain of salt, since I don't know shit.

Functional features in imperative languages are pretty sweet, though, in my experience.
Nifty Nif A Whirring, Bone-White Gleech

Zekka

  • I AM IN INTO MATHEMATICAL CALCULATIONS AND MANY METHODS USED IN THE STOCK MARKET
  • Paid
    • 785
    • 56
Thread.setTitle("Programmers Anonymous");
« Reply #29 on: July 22, 2016, 12:54:14 pm »
It seems to me that, when people talk about functional programming, they're talking about two different things. There are languages with good functional programming support, like Python 3, Scala, and Rust. Then there are pure functional languages where mutable state does not exist outside of monads, like Haskell and (I think) Erlang. I'm pretty sure nuffkins was complaining about proponents of the latter.

Of course, in their defense, Erlang has been used to build practical things a bunch of times. It was born out of a desire to build telephone exchanges. So, you've got at least one functional programming language that people have used to solve real problems.

Pure functional languages still weird me out and I have no idea how to build anything in any of them. Take my opinion with a grain of salt, since I don't know shit.

Functional features in imperative languages are pretty sweet, though, in my experience.

FWIW, IIRC Haskell and Idris are the only functional languages right now that are widely cared-about and have a strong preference towards monads. The monad thing is basically a magic trick you use to convince yourself code you would write anyways is OK -- there are advantages but for most programs they are pretty negligible. Monads just guarantee your program is rewritable to a version of your program that didn't use mutation.

IIRC some dogmatic functional languages that don't use monads are Mercury and Clean. (not positive, but I believe they use linear typing, which works like Rust's affine typing)

IIRC erlang is pretty pragmatic and doesn't represent most of the stuff you dislike -- it's also largely untyped.

IIRC. IIRC.