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
FamDav
Mar 29, 2008

yeah, i ended up finding that and inferred it from this https://github.com/rust-lang/rust/pull/7926 . i just think its frustrating that the only documentation of modules is exactly how you aren't going to want to use them.

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill
"pub mod", really? is it 1968 again and our compiler needs every keyword to fit in a single 36-bit word on our PDP minicomputers?

FamDav
Mar 29, 2008

Soricidus posted:

"pub mod", really? is it 1968 again and our compiler needs every keyword to fit in a single 36-bit word on our PDP minicomputers?

the list of keywords from the rust docs

as
box break
continue crate
else enum extern
false fn for
if impl in
let loop
match mod mut
priv proc pub
ref return
self static struct super
trait true type
unsafe use
while

you then have int, uint, i8 to i64, u8 to u64, f32, f64, bool, and str

fritz
Jul 26, 2003

rjmccall posted:

there are two basic type-checking strategies in the world: bottom-up, where you analyze sub-expressions independently of each other, and constraint-based, where you look at an entire expression simultaneously


rjmccall posted:

okay. most type systems can be expressed as a conjunction of relationships


thank you for making these posts

fritz
Jul 26, 2003

AlsoD posted:

code:
fib (n) = flip evalState (0,1) $ do
{
    forM [0..(n-1)] $ \i -> do
    {
        (a,b) <- get
        put (b,a+b)
    }
    (a,b) <- get
    return a
}

code:
~waclux-tomwyc/try=> "hello, world"
"hello, world"

~waclux-tomwyc/try=> (add 2 2)
4

~waclux-tomwyc/try=> :hello %world
"hello, world."

~waclux-tomwyc/try=> :cat /=main=/bin/hello/hoon
::
::  /=main=/bin/hello/hoon
::
|=  *
|=  [planet=@ta ~]
^-  bowl
:_  ~  :_  ~
:-  %%
!>("hello, {(trip planet)}.")

Vanadium
Jan 8, 2005

The terse rust keywords own. continue used to be cont until I think tjc pointed out that it'd be nice to be able to say the keywords out loud in polite company. return used to be ret. I think they must have started out just using llvm keywords where applicable and going from there.

The rust module system is sort of ok but it's apparently really hard to get people to wrap their head around mod adding files to the module tree as children of the current module, and use bringing names into the current scope, and each module starting with an empty namespace (plus the prelude) even if it's lexically within another module, and having to use ::absolute::paths to refer to sibling(/uncle?) modules outside of use items. People keep showing on irc up being confused about it and/or suggesting it should be different, but the rust team is pretty happy with how it works.

I sorta miss extern mod being the invocation to link against a library. :shobon:

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

rjmccall posted:

i even tried to make it easier to understand :(

it's not you, it's me. my mathematical education stopped after high school, so I have to dig through layers of terminology that is perfectly reasonable and appropriate to use when discussing the topic at hand. I do think I understand better having read your posts, though; maybe enough to try to brave Pierce again soon.

thanks!

FamDav
Mar 29, 2008

Vanadium posted:

The terse rust keywords own. continue used to be cont until I think tjc pointed out that it'd be nice to be able to say the keywords out loud in polite company. return used to be ret. I think they must have started out just using llvm keywords where applicable and going from there.

The rust module system is sort of ok but it's apparently really hard to get people to wrap their head around mod adding files to the module tree as children of the current module, and use bringing names into the current scope, and each module starting with an empty namespace (plus the prelude) even if it's lexically within another module, and having to use ::absolute::paths to refer to sibling(/uncle?) modules outside of use items. People keep showing on irc up being confused about it and/or suggesting it should be different, but the rust team is pretty happy with how it works.

I sorta miss extern mod being the invocation to link against a library. :shobon:

it actually makes a lot of sense when it's explained. the problem is no guide apparently does. maybe they should explain it so people don't have to infer it from another codebase?

I dunno, I'm not s compiler maintainer.

Vanadium
Jan 8, 2005

Yeah. They're giving money to steve klabnik to (re-)write all those guides, at least.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
#fuckgamergate2014 (@steveklabnik) | Twitter
https://twitter.com/steveklabnik
The latest Tweets from #fuckgamergate2014 (@steveklabnik). AXIOM 1: The war machine is exterior to the State apparatus. smooth space.

Yeah, I'm not touching this one.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i dont really understand which position on gamergate someone who says #fuckgamergate stands on

Star War Sex Parrot
Oct 2, 2003

no gamergate chat in here

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
does steve klabnik actually know how to program? all his code is in ruby or js

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

crazypenguin posted:

I'd say bi-directional type checking is another general strategy. On the other hand, I thought Scala was based on bidirectional type checking, and you keep talking about how Scala's a horrible hack. Have they strayed from the original elegance, or do you really not like this approach for some reason?

hmm. i wouldn't call it horrible, but i do think it's fair to call the type system a hack because of how idiosyncratic it feels in practice. there are blogposts telling you how to structure your scala apis in order to get type inference to work better for your callers. i understand and sympathize with not wanting an even more complex type checker, but to me, scala's type system crosses the line of no longer being readily comprehensible to non-savants while still having some embarrassing lapses in its ability to type reasonable programs

bi-di systems do deserve to be listed as their own strategy, but they're still relatively uncommon in major languages, and in my experience they, well, tend to end up like scala's if you're not careful. it's a technique that makes it really easy to pile up quasi-principled hacks to make the next interesting testcase work. swift started off with a bi-di checker and it just got completely out of control; that's definitely our fault, but it left a bad taste in my mouth

FamDav
Mar 29, 2008

Blotto Skorzany posted:

does steve klabnik actually know how to program? all his code is in ruby or js

i remember him for two things

1) he has a bald spot in his mohawk
2) he was a huge rear end in a top hat to some person who put some less than stellar code out there: http://harthur.wordpress.com/2013/01/24/771/ and his lame rear end reply http://blog.steveklabnik.com/posts/2013-01-23-node

but wait, he was a core contributor for rails guys!

https://github.com/rails/rails/commits?author=steveklabnik

something like 90% merging other people's code in (which i hope doesn't show up under his username in the actual logs) and a few one liner fixes here and there.

famdav evaluation: poo poo developer.

FamDav
Mar 29, 2008
btw he could've been a serious contributor of some awesome features in rails and i still would not care. dude literally tore up on somebody's work in a public form with no constructive criticism whatsoever and then gave the most milquetoast "what i would actually expect from a white nerd with a mohawk" apology ever. he is ruby_devs.md.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
i don't understand your continuous use of white as a pejorative in this thread but thank you for confirming my gut instinct that that guy is a doofus

sarehu
Apr 20, 2007

(call/cc call/cc)
He always had king_kilr-level HN postings, then I learned he was an actual developer of sorts from the whole twitter/fake apology thing. My "favorite" steveklabnik moment is when somebody hacked his Github account and parodied the depth of his open source activity here: https://github.com/rust-lang/rfcs/pull/117

(edit: The hacker was his conscience.)

sarehu fucked around with this message at 04:06 on Oct 16, 2014

Vanadium
Jan 8, 2005

he's been on the pleasant side of the rust community, welp. i guess i wasn't paying attention to him back when that thing blew up.

Vanadium
Jan 8, 2005

sarehu posted:

He always had king_kilr-level HN postings, then I learned he was an actual developer of sorts from the whole twitter/fake apology thing. My "favorite" steveklabnik moment is when somebody hacked his Github account and parodied the depth of his open source activity here: https://github.com/rust-lang/rfcs/pull/117

in it, voted 5

edit: who's king_kilr

Vanadium fucked around with this message at 04:09 on Oct 16, 2014

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

sarehu posted:

My "favorite" steveklabnik moment is when somebody hacked his Github account and parodied the depth of his open source activity here: https://github.com/rust-lang/rfcs/pull/117

(edit: The hacker was his conscience.)

lol

tef
May 30, 2004

-> some l-system crap ->

Blotto Skorzany posted:

does steve klabnik actually know how to program? all his code is in ruby or js

unno but he's fun to go to the pub with and he can take criticism well. i like steve :3:

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Vanadium posted:

in it, voted 5

edit: who's king_kilr

Alex Gaynor

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

FamDav posted:

2) he was a huge rear end in a top hat to some person who put some less than stellar code out there: http://harthur.wordpress.com/2013/01/24/771/ and his lame rear end reply http://blog.steveklabnik.com/posts/2013-01-23-node

heather is wonderful and smart, too, that sucked. I guess they're sort of co-workers now, if Mozilla is paying the cargo-doc contract.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

ok so ruby

ruby's a decent enough language if you can get by without strong typing. it does some stupid things (nil is one of the big ones), but all in all i don't find that hampers me too much

what hampers me a lot is the metaprogramming bs it's so central to the language and all of the big libraries did it for a long time so people think its ok to use everywhere and a lot of teaching resources still introduce metaprogramming early

if you use method_missing your code is probably literal garbage

but it makes for some relatively reasonable code and people tend to stick to some standard method names for some standard functionality so its pretty easy to pick up a new library quickly

all in all i like being a ruby developer and will be one as long as it continues to pay way more than it should

Cybernetic Vermin
Apr 18, 2005

tbqh i dont see the point of ruby if you dont do the metaprogramming often and deeply. dont treat it as a general language and try to scale, just abuse it for tasks where the metaprogramming actually pays off

EVGA Longoria
Dec 25, 2005

Let's go exploring!

its got a p rich set of web tools and libraries so its great for getting a web app running quickly

don't know about scaling stuff as we haven't run into issues so far with a fairly big site

will see how things look in 6 months when everything is rails

Shaggar
Apr 26, 2006
Probation
Can't post for 5 hours!

EVGA Longoria posted:

its got a p rich set of web tools and libraries so its great for getting a web app running quickly

this is a myth perpetuated by people who only use p-langs. mvc + webapi are both better for prototyping and can actually be used in production

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
ruby sucks and has literally zero benefits compared to any other plang. if you are doing web stuff the right tool for the job is almost always php

EVGA Longoria
Dec 25, 2005

Let's go exploring!

Shaggar posted:

this is a myth perpetuated by people who only use p-langs. mvc + webapi are both better for prototyping and can actually be used in production

we are moving from mvc to ruby because mvc app downstairs is utter garbage

probably based on the coding though more than the language

honestly i don't care about the language for the most part. use a language, write a code, get paid

with a few exceptions...

Tiny Bug Child posted:

ruby sucks and has literally zero benefits compared to any other plang. if you are doing web stuff the right tool for the job is almost always php

adults are speaking, fly away

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
is it just me or ruby code rarely have any comments? at least this has been my experience with ruby code. "my code is elegant and self-evident why ever comment anything? :smug:"

Shaggar
Apr 26, 2006
Probation
Can't post for 5 hours!

EVGA Longoria posted:

we are moving from mvc to ruby because mvc app downstairs is utter garbage

probably based on the coding though more than the language

honestly i don't care about the language for the most part. use a language, write a code, get paid

with a few exceptions...


adults are speaking, fly away

idk what mvc app downstairs means

Cybernetic Vermin
Apr 18, 2005

comments are stupid

triple sulk
Sep 17, 2014



Symbolic Butt posted:

is it just me or ruby code rarely have any comments? at least this has been my experience with ruby code. "my code is elegant and self-evident why ever comment anything? :smug:"

Correct. You will virtually never see comments/quality documentation beyond a readme if the library isn't incredibly significant/hasn't been written by a big company.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

EVGA Longoria posted:

adults are speaking, fly away

go read like the last 10 pages where tef continually shits on ruby, it's great

all of the problems with php were fixed years ago. it's 2014, php powers most of the web, and if you still think it's an inferior language then sorry but modern development has passed you by

JewKiller 3000
Nov 28, 2006

by Lowtax

Tiny Bug Child posted:

go read like the last 10 pages where tef continually shits on ruby, it's great

all of the problems with php were fixed years ago. it's 2014, php powers most of the web, and if you still think it's an inferior language then sorry but modern development has passed you by

your gimmick is beyond played out

Symbolic Butt posted:

is it just me or ruby code rarely have any comments? at least this has been my experience with ruby code. "my code is elegant and self-evident why ever comment anything? :smug:"

if there are comments, they're in japanese

tef
May 30, 2004

-> some l-system crap ->
a.member? b

this is rubby what does it do

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

tef posted:

a.member? b

Prince's song titles gettin weird

FamDav
Mar 29, 2008

tef posted:

a.member? b

this is rubby what does it do

depends on what a is i guess

also i wanted to actually know so i looked up the docs and lol: http://ruby-doc.org/core-2.1.3/Enumerable.html#method-i-member-3F

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

I love how ruby docs for aliases don't even use the alias in the example code, just the thing it's an alias for.

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