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
JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

lol scala is a crazy lang

did you actually find a resource after everyone here XY'd it?

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

kinda yeah. part of scala for the impatient is free online

Soricidus
Oct 21, 2010
freedom-hating statist shill

JawnV6 posted:

did you actually find a resource after everyone here XY'd it?

if you mention a programming language any computer thing in here and expect any kind of response other than "computer thing is a pos, try other computer thing" then i don't know what to tell you

FamDav
Mar 29, 2008

Bloody posted:

kinda yeah. part of scala for the impatient is free online

scala for the impatient is a good starter for anyone who has developed in a language used by more than, like, 5 people.

for functional scala, i don't really think there's a good resource for just that. the community for the most part has been moving away from scalaz' "haskell, but atrocious" junk and that library has even said operator soup just doesn't work in scala.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
has the old couriers course by odersky been mentioned? it's 100% about functional programming in scala if that's what you're specifically looking for.

Sapozhnik
Jan 2, 2005

Nap Ghost

Asshole Masonanie
Oct 27, 2009

by vyelkin

im glad someone made that joke into a thing IRL

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

countdown to some oblivious fucker sporting that sticker unironically.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

lold

Asshole Masonanie
Oct 27, 2009

by vyelkin

ultramiraculous posted:

countdown to some oblivious fucker sporting that sticker unironically.

haha yeah, mongoDB is actually really good!

Fullets
Feb 5, 2009

FamDav posted:

scala for the impatient is a good starter for anyone who has developed in a language used by more than, like, 5 people.

for functional scala, i don't really think there's a good resource for just that. the community for the most part has been moving away from scalaz' "haskell, but atrocious" junk and that library has even said operator soup just doesn't work in scala.

functional programming in scala is probably the closest fit. it's pretty good and the last chapter covers scalaz-stream which can otherwise be pretty opaque

if you want to do stuff with types and run on the jvm there are worse choices. frege could be cool but its even less mature than scala. the scala fp crowd are for the most part still all there doing stuff, a bunch of people have been moving away from scalaz only inasmuch as they've moved to cats which (aims to) have all the same stuff with different names/package + module structure/etc and still has some of the "fun" operators with their attendant surprised and confusion. this is awesome because now other libraries get to work out how to support both cats and scalaz at the same time.

Fullets fucked around with this message at 07:34 on Dec 23, 2015

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

brap
Aug 23, 2004

Grimey Drawer
how about kotlin

Soricidus
Oct 21, 2010
freedom-hating statist shill
looked at it briefly a while ago and it didn't seem to offer enough over java8 + judicious lombok to justify learning a new language that nobody else uses

but I'm prepared to be convinced I missed something

FamDav
Mar 29, 2008
kotlin would be better if it didn't require an associated runtime jar, but I could see replacing application code with it

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
it's more interesting on android where you're never getting anything past java 6

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Soricidus posted:

looked at it briefly a while ago and it didn't seem to offer enough over java8 + judicious lombok to justify learning a new language that nobody else uses
same here, but i found that if you rely on lombok for magic and it gives you slightly different magic than you need (i.e. if you want nested builders, which it doesn't really support) then you end up with delomboked code that looks nasty, whereas with kotlin it'd just be...well, the same kotlin code you already had

Soricidus
Oct 21, 2010
freedom-hating statist shill

Sagacity posted:

you end up with delomboked code

I don't, though

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Alan Kay posted:

The same way it should be easier to do your own composting, you should have the ability to deal with complicated ideas by making models of them on the computer.
OOP = poop

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Gazpacho posted:

OOP = poop

:agreed:

tef
May 30, 2004

-> some l-system crap ->
hey

perl 6 is out today? well https://rt.perl.org/Public/Bug/Display.html?id=123766

i guess there's nothing blocking it and they did this?

https://perl6advent.wordpress.com/2015/12/24/an-unexpectedly-long-expected-party/

but there's no links to a release? i guess there's something on the page for rakudo perl

http://rakudo.org/ which is a month old. like, what's been released?

https://github.com/perl6/roast/commits/6.c the test suite has a 6.c branch? the specs haven't changed either https://github.com/perl6/specs

anyone

anyone

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
perl6 was inside us all along

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Painfully Esoteric, Released Late

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
actual perl 6 launch footage

https://www.youtube.com/watch?v=7O4V7JfeTSU

Soricidus
Oct 21, 2010
freedom-hating statist shill
i remember caring about perl6

qntm
Jun 17, 2009
you should care about perl 6 because the more you learn about it the more hilarious it gets

for example the main data type Cool from which nearly everything inherit provides string methods and numeric methods to most of the type heirarchy, but doesn't have the Numeric role or the Stringy role (also the Stringy role doesn't provide any methods)

anyway https://perl6advent.wordpress.com/2015/12/25/christmas-is-here/

tef
May 30, 2004

-> some l-system crap ->

qntm posted:

you should care about perl 6 because the more you learn about it the more hilarious it gets

i remember when it was announced.

i remember when hugs came out and suddenly people thought it might happen for real this time. i even met someone with a perl 6 "lambda camel" t-shirt working on it (nb, same place where i saw 3+ plan 9 users in the same room at same time, and there were more dylan programmers than perl 6 ones at the time too).

quote:

for example the main data type Cool from which nearly everything inherit provides string methods and numeric methods to most of the type heirarchy, but doesn't have the Numeric role or the Stringy role (also the Stringy role doesn't provide any methods)

i have stared at the void for too long and can see the rationale, or invent one

"everything will need to be printed eventually, so everything will have a string method, and then we'll tag the real strings with "Stringy" so you can avoid implicit typecasting to string by a role check"

"i guess if we want to avoid implicit type casting, we need to do the same for numbers. hey, but we use scalars as the basic type. let's just have a scalar type and then explicit tags for number or string, and call it cool because i'm larry wall"

tef
May 30, 2004

-> some l-system crap ->
i often joke that ruby is a language designed to look pleasing to read on slides, no excess punctuation, familiar structure, and the semantics seem to be bolted on to make a handful of syntax examples work. perl 6 seems to be what happens when this rationale is applied over fifteen years, and instead of in slideware, specware.

( i am sure the tests and specification are well written, larry is a very good and funny technical writer, part of why people picked up perl 5 in the first place was the docs)

tef
May 30, 2004

-> some l-system crap ->

qntm posted:

you should care about perl 6 because the more you learn about it the more hilarious it gets

so i saw a "perl 6 is happening" talk at fosdem, it's as if perl has been in a nuclear bunker for the last 15 years.

most of the focus was on "so, we found a thing you wanted to do and we couldn't do it in one or two readable lines so we added another operator and data type".

i mean, i like roles, i like rules, but most of perl 6's useful ideas could and have been bolted onto a smaller language, and they already have docs, modules, libraries, package management, test frameworks.

instead, perl has spent 15 years polishing a series of hard to google operators and syntax quirks, and a whole bunch of features to let people write code with a tiny line count. not so much "if we build it they will come" but anything that could be rewritten in perl 6 from perl 5 will have been turned into go, ruby, python by now, and the ones left won't be changing any time soon.

it's not as if python 3 was a simple change but when you look at perl 6 it is hard to call python 3 anything other than wildly successful.

pepito sanchez
Apr 3, 2004
I'm not mexican
I'm late to the party but the posts about Java pass by reference made me go back and look at some small examples.

Java code:
public static void main(String[] args) {
        int x = 1;
        modify(x);
        System.out.println(x); // 1 indicates variable was passed by value
                               // 2 indicates variable was passed by reference
    }
     public static void modify(int input) {
	    input = 2;
     }
prints 1. it's a primitive.

Java code:
public static void main(String[] args) {
        String x = "blue";
        modify(x);
        System.out.println(x); // "blue" indicates variable was passed by value
                               // "red" indicates variable was passed by reference
    }
     public static void modify(String input) {
	    input = "red";
     }
prints blue, although String is an object. is this because String is a ~special object~ or does this have something to do with it being referenced in a static context?

raminasi
Jan 25, 2005

a last drink with no ice

pepito sanchez posted:

I'm late to the party but the posts about Java pass by reference made me go back and look at some small examples.

Java code:

public static void main(String[] args) {
        int x = 1;
        modify(x);
        System.out.println(x); // 1 indicates variable was passed by value
                               // 2 indicates variable was passed by reference
    }
     public static void modify(int input) {
	    input = 2;
     }

prints 1. it's a primitive.

Java code:

public static void main(String[] args) {
        String x = "blue";
        modify(x);
        System.out.println(x); // "blue" indicates variable was passed by value
                               // "red" indicates variable was passed by reference
    }
     public static void modify(String input) {
	    input = "red";
     }

prints blue, although String is an object. is this because String is a ~special object~ or does this have something to do with it being referenced in a static context?

String is an object type, but value is an object reference, which is passed by value

Serenade
Nov 5, 2011

"I should really learn to fucking read"
this was the first impression I had of perl 6 beyond its name: http://www.ozonehouse.com/mark/periodic/

at the time I couldn't tell if it was satire

tef
May 30, 2004

-> some l-system crap ->

pepito sanchez posted:

I'm late to the party but the posts about Java pass by reference made me go back and look at some small examples.

prints blue, although String is an object. is this because String is a ~special object~ or does this have something to do with it being referenced in a static context?

let's look at something simpler.

int a = 1
int b = a
a = 3
# a != b

now what if you do

String a = new String("foo")
String b = new String("foo")

a != b but a.equals(b)

or
String a = "foo"
a = "bar"

what you're doing in those two examples above is changing what the variable stores. in java, variables can store either primitive values directly, or store the address of an object in memory elsewhere. as you're doing it to a function parameter, the value (an address or a primitive) is copied into a new variable for the function's environment, and then reassigned.

it is worth bearing in mind that python and ruby and javascript are also call by value, but they do not have primitives, they can only store addresses of objects.

but you can pass in mutable objects and change them, and it's as if you did this

List a = new ArrayList();
List b = a
a.append("foo")

# a == b is true, they both store the same address in memory
# a.get(0) will be b.get(0)

tef
May 30, 2004

-> some l-system crap ->

Serenade posted:

this was the first impression I had of perl 6 beyond its name: http://www.ozonehouse.com/mark/periodic/

at the time I couldn't tell if it was satire

satire is dead, perl is postmoden

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
my first experience with perl6 was https://www.reddit.com/r/perl6/comments/r44do/is_perl6_code_unreadable/

pepito sanchez
Apr 3, 2004
I'm not mexican
right. I didn't know that about java function parameters. But I never tried using void methods that way either. Because why would anyone?

The rest makes sense. Thanks.

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

tef posted:

"i guess if we want to avoid implicit type casting, we need to do the same for numbers. hey, but we use scalars as the basic type. let's just have a scalar type and then explicit tags for number or string, and call it cool because i'm larry wall"

after 15 years of work, they arrived at p much the perl 5 situation ([ask] me about writing xs extensions)

sarehu
Apr 20, 2007

(call/cc call/cc)
One advantage of Perl 6 is people won't rant at you when your project supports Perl 5 but not Perl 6.

fritz
Jul 26, 2003


[–]diakopter 2 points 3 years ago
I agree it's inpenetrable and therefore unmaintainable to a non-expert of Perl 6. Otoh, not all code needs to be maintainable. Some code [like this example] exists purely for aesthetic purposes, or for educational purposes. Also, some code is purposefully written as tersely as possible to challenge the reader's parsing skills. Idiomatic Perl 6 is apparently maximally-terse Perl 6, or at least maximally-distinctive Perl 6, and writing in a language idiomatically is all the rage these days. Languages whose idioms differ greatly from most other languages are distinctive. To sum up, yes, very idiomatic code in any language is unmaintainable by someone not familiar with that language's idioms. . Whether or not highly idiomatic code should be used in production (for business or for large-scale personal projects) is another question. Your business doesn't need to commit to writing/maintaining highly terse Perl 6 if you choose to use an implementation of Perl 6 in production. Enforce yourself and your developers to use whatever coding standards you think are best: especially with Perl, you have ultimate flexibility in designing standards that are effectively DSLs or use whatever programming paradigm you wish.

Adbot
ADBOT LOVES YOU

fuck the mods
Mar 30, 2015
i have monthly contributions to rakudo core for over a year while programming stuff in it for over 3 years now. it's pretty easy because things will be thrown out the window and completely changed at the whim of a fart. for instance: the entire module loading and byte code generating stage was revamped like 2 months before release, and by revamped I mean someone took the lead devs gist of pseudo code literally (as in his first step was cutting and pasting the pseudo code into a fork and patting themselves on the back in irc repeatedly) while never looking at the actual spec or current implementation. There are multiple modules, including Star bundled http useragent, that had to add 'no precompilation' to even work. also it will still generate the precompiled files but this is ok because no one ever used a read only file system ever. it was also important to merge this poo poo in its half assed form as soon as possible because of egos and attention. unsurprisingly it's still just the one person working on that part presumably because everyone who worked on the previous implementation also realized it just needed to be brought inline with the concepts of the aforementioned gist, not redone from scratch because empty functions make more sense to you than working code. all of these people are smart as hell but there really is no strong lead or direction beyond the parts Larry rules on. there is a recent PR from someone very new to programming that got merged, and then half a day later the pr author comments that it should be reverted (which should have been obvious to anyone) but hey who needs to code review anything from the guy who blogs about using poop6 to scrape MLP fan fiction and also has a github avatar of one.

I'm mad about new perl and wrote all of this

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