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
double sulk
Jul 2, 2010

oops

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

i have a linux vm. i used it for a week or two then realized it was obsolete because i had visual studio.

Notorious b.s.d.
Jan 25, 2003

by Reene

Bloody posted:

i have a linux vm. i used it for a week or two then realized it was obsolete because i had visual studio.

visual studio has paradoxically great python support

so you can use the "best" ide to write code that won't work on your terrible platform

Workaday Wizard
Oct 23, 2009

by Pragmatica
did anybody invent a vm with good power management yet?

Notorious b.s.d.
Jan 25, 2003

by Reene

Shinku ABOOKEN posted:

did anybody invent a vm with good power management yet?

just install linux directly on the hardware, problem solved

skeevy achievements
Feb 25, 2008

by merry exmarx
brb learning Swift

Soricidus
Oct 21, 2010
freedom-hating statist shill
I used visual studio today for the first time in I guess at least a decade? it's pretty good. don't think I'll be abandoning linux tho, everything else about windows is still poo poo.

Shaggar
Apr 26, 2006
lol so wrong. Linux is total garbage

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

lol so wrong. Linux is total garbage

how does it feel to see your platform expertise sinking into irrelevance

Shaggar
Apr 26, 2006
what do you mean? I don't use Linux

Soricidus
Oct 21, 2010
freedom-hating statist shill

Shaggar posted:

Linux is total garbage
shaggar was right

I just prefer garbage to poo poo

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY


it's apples new language

double sulk
Jul 2, 2010

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
im not gonna pretend this isn't a point of sperginess but: pi on a double is exactly 3.14159 :catstare:

UncleBlazer
Jan 27, 2011


This language is already going places.

pseudorandom name
May 6, 2007

places that other languages have already been

KidDynamite
Feb 11, 2005


notice it's not printing from the actual print statement playgrounds is poo poo

tractor fanatic
Sep 9, 2005

Pillbug

poo poo does 10.10 really look like that

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION
http://swift-lang.org/ welp

BONGHITZ
Jan 1, 1970

my body is ready

ComradeCosmobot
Dec 4, 2004

USPOL July

its okay tho since theres a link to that site at the bottom of the page at on the apple dev site for the language and as we all know that makes this totally legit

tef
May 30, 2004

-> some l-system crap ->

https://developer.apple.com/library...14097-CH3-XID_0 :q:

tractor fanatic
Sep 9, 2005

Pillbug

quote:

A closure passed as the last argument to a function can appear immediately after the parentheses.

sort([1, 5, 3, 12, 2]) { $0 > $1 }

huh.

Nomnom Cookie
Aug 30, 2009



quote:

The company says it’s quick, much faster than Objective-C which developers have typically used. It sports closures, generics, type inference, name spaces, multiple return types and more. It’s completely native to Cocoa and Cocoa Touch, Apple said, allowing you to run your Swift Code right alongside Objective-C and C code in the same application. A Swift “playground” lets you run your code as you type it and displays the result as you go in a sidebar.

its scala for iPhones but all u can do with it is fart apps. gj crapple

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

ComradeCosmobot posted:

its okay tho since theres a link to that site at the bottom of the page at on the apple dev site for the language and as we all know that makes this totally legit

we talked to them and worked something out, i don't know the details other than that they wanted to keep the domain and for us to link them from our site, which is honestly pretty reasonable as a condition of giving up a trademark

tef
May 30, 2004

-> some l-system crap ->
btw thanks for spending time and answering questions.


and the enum/match operation is enough to make me want to try it.

tef
May 30, 2004

-> some l-system crap ->
it's a weird hodgepodge of design influences

i can see the big constraints: make a language that compiles with llvm to interoperate with the obj-c runtime and libraries, and the big ideas: but with an emphasis on immutability by default, generics, and all of the bits of standard ml hidden in (like how your operators are adt esque)

but i can also see the smaller influences, perl-like syntax: $0 $1 and underscores in numbers, but those might have come about from ruby, along with the special closure passing syntax

ComradeCosmobot
Dec 4, 2004

USPOL July

rjmccall posted:

we talked to them and worked something out, i don't know the details other than that they wanted to keep the domain and for us to link them from our site, which is honestly pretty reasonable as a condition of giving up a trademark

that's what i heard too, but i heard it from an apple store employee

true story

fritz
Jul 26, 2003

coffeetable posted:

im not gonna pretend this isn't a point of sperginess but: pi on a double is exactly 3.14159 :catstare:

uh huh

Vanadium
Jan 8, 2005

Swift kinda looks like Rust if you squint enough to not notice semicolons and weird pattern matching syntax :3:

suffix
Jul 27, 2013

Wheeee!
so ARC is just normal refererence counting, right?

i somehow got the impression that it was using some clever new design from the hubbub when it came out, but i can't find anything special about it

pseudorandom name
May 6, 2007

the specialness is that the compiler adjusts the refcount for you

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
iirc the compiler takes the same theoretical framework that it uses to optimize variable assignments and puts it to work finding new/dead refs instead, kinda weird that nobody did it before

Gazpacho fucked around with this message at 04:56 on Jun 3, 2014

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The issue with ARC (and all refcounting) is that it can't break reference cycles, so you have to be particularly careful when you use it.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Suspicious Dish posted:

The issue with ARC (and all refcounting) is that it can't break reference cycles, so you have to be particularly careful when you use it.
good advice for programmers who are even slightly careful in the first place

i've seen things in COM code that you people wouldn't believe

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

suffix posted:

so ARC is just normal refererence counting, right?

i somehow got the impression that it was using some clever new design from the hubbub when it came out, but i can't find anything special about it

the basic idea of a compiler doing automatic reference counting is pretty obvious and had been done a million times before, most notably in visual basic. and it's supposed to be really easy. if you're designing an environment around automatic reference counting, then you're going to set up all the obvious sensible invariants and transfer rules, like "a variable always owns a +1 on the object it references" and "return values are transferred at +1"

objective-c didn't have reference counting to start with; you called alloc, got an object back which you owned and eventually called dealloc on it. no shared ownership at all. if you were passed something and didn't own it, you were supposed to copy it. they eventually realized that this was causing massive performance problems from all the unnecessary copies just to get uniquely-owned objects, so they added reference counting. but it's manual reference counting, and programmers don't want to clutter their code with manual +1s (retains) and -1s (releases), so the convention is to only return +1 when you're returning a new object. somebody eventually wants to return a new object via an interface that doesn't expect it, so let's add an "autorelease pool", a thread-local collection of objects to be released at some safe point later. okay, now we want to take a bunch of APIs and have them return an error back, indirectly. is it really a good idea to trust the caller to do memory management correctly in an error case? better autorelease it instead so they don't have to think about it. eventually people realize they can use autorelease pools to let callers be lazy even with methods that are always expected to return new objects, because the autorelease pool removes the caller's need to remember to release it. oh and you can identify methods that return new objects using their names, except for all the exceptions.

basically, everything interesting about ARC is because the automatic reference counting was added years after the fact to a system that had gone absolutely batshit insane

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

tef posted:

it's a weird hodgepodge of design influences

i can see the big constraints: make a language that compiles with llvm to interoperate with the obj-c runtime and libraries, and the big ideas: but with an emphasis on immutability by default, generics, and all of the bits of standard ml hidden in (like how your operators are adt esque)

but i can also see the smaller influences, perl-like syntax: $0 $1 and underscores in numbers, but those might have come about from ruby, along with the special closure passing syntax

its basically a modern ocaml with objective c interop and some lightweight syntax -- similar to rust but without the interesting bits around high performance zero overhead.

nothing mindblowing, adts + pattern matching have been around for ages

the tooling on the other hand is very very good. opening up the time-traveling debugger would be nice.

still not convinced that arc is better than proper gc.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Suspicious Dish posted:

The issue with ARC (and all refcounting) is that it can't break reference cycles, so you have to be particularly careful when you use it.

also it's not real time, and people think it is, which can lead to interesting situations

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
Also no true data generic programming, so i have to write poo poo like description and json serialization and other boilerplate crap

Scrap your boilerplate is the best thing about haskell; rust grabbed the deriving mechanism but idk if it got the generics via anything but macros

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

as opposed to sort([1, 5, 3, 12, 2], { $0 > $1 })

which sux because you end up with javascript

(no idea what the $0 and $1 are doing here)

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