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
crazypenguin
Mar 9, 2005
nothing witty here, move along

Ralith posted:

In rust, "task" is just the word for a top-level future, i.e. one driven directly by an event loop, rather than by another future.

Is that still the case? There was the 0.1 API where I think this is true, the proposal for adding futures to the stdlib, the revised proposal that was also tabled, and there's another alternative proposal cooking that hasn't been posted, and I thought somewhere is all that mess, Task became an actual abstraction.

I could be hallucinating though.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

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

mystes posted:

YOSPOS: hasn’t everybody that attempted green threads inevitably abandoned them?

yeah amberpos is much better

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today

crazypenguin posted:

Is that still the case? There was the 0.1 API where I think this is true, the proposal for adding futures to the stdlib, the revised proposal that was also tabled, and there's another alternative proposal cooking that hasn't been posted, and I thought somewhere is all that mess, Task became an actual abstraction.

I could be hallucinating though.
Futures work fundamentally the same way they always have; now that borrowing across await works it's mostly just bikeshedding names/documentation. Tasks are meaningful in that they're the unit of wake-ups, by definition of being driven directly by the event loop, but the only abstraction involved there is abstracting over how a wake-up is performed so that the stdlib futures API doesn't have to make any assumptions about how event loops work.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Sapozhnik posted:

Is there a single implementation of async await where I can await A which {awaits B and then awaits C} and have an oops in C yield an actually useful stack trace instead of seeing "_internalScheduleWorkItem called B$closure02f7116c called C” or similar

Green Threads did nothing wrong

not async/await but Cocoa's Grand Central Dispatch does this for async blocks and it's very helpful

icantfindaname
Jul 1, 2008


This isn't really a programming language, but is it possible to search for tweets on twitter that contain urls? Not a specific url, but any http link

Nomnom Cookie
Aug 30, 2009



icantfindaname posted:

This isn't really a programming language, but is it possible to search for tweets on twitter that contain urls? Not a specific url, but any http link

twitter sells a feed of that so no probably not

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

icantfindaname posted:

This isn't really a programming language, but is it possible to search for tweets on twitter that contain urls? Not a specific url, but any http link

i don't think there is a specific "any url" search or keyword, but the json that the apis return has "url entities" https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/entities-object.html

but i think url entities are populated even when replying and retweeting, with a reference to the original tweet

akadajet
Sep 14, 2003

i'm so happy i don't work somewhere that wants to analyze tweets

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

hackbunny posted:

not async/await but Cocoa's Grand Central Dispatch does this for async blocks and it's very helpful

adding that was probably the biggest productivity boost a devtools update has ever given me. it's so absurdly helpful

especially with the all-too-common cocoa pattern of "just loving throw dispatch_async() calls around everywhere for no reason at all"

Vanadium
Jan 8, 2005

bad twitter UI is just got me unrealistically excited about clojure

Cybernetic Vermin
Apr 18, 2005

never done anything in clojure, but one of those i follow since it really comes off as a really sensible project, one can take issue with the basic choices (dynamic, lisp), but from there the design is intelligently driven

clojure.spec for example is quite neat

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
yeah, i'm not trying to diss clojure there, although now i've got clojure fans coming out of the woodwork to list off everything that clojure's ever done

somebody mentioned that clojure uses stm, and if so then that's the first ambitious thing i know it does? and now i'm really curious how they do that efficiently without jvm support. but sorry, stuff like "immutable data structures" may be a really good basic design decision but it is not particularly innovative to "bring it to the jvm"

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
I like clojure a lot but lisps are just annoying to work with

Cybernetic Vermin
Apr 18, 2005

rjmccall posted:

yeah, i'm not trying to diss clojure there, although now i've got clojure fans coming out of the woodwork to list off everything that clojure's ever done

somebody mentioned that clojure uses stm, and if so then that's the first ambitious thing i know it does? and now i'm really curious how they do that efficiently without jvm support. but sorry, stuff like "immutable data structures" may be a really good basic design decision but it is not particularly innovative to "bring it to the jvm"

i largely agree, but then 'innovation' is really far down on the list of important pl features outside of this thread

was largely the point of that twitter thread alsp; that it is fine'ish that rust is more unstable (spec- and implementation-wise) since it is more innovative/ambitious than clojure

still, doesn't make for interesting pl posting to do a bunch of simple things well in concert

CPColin
Sep 9, 2003

Big ol' smile.

Malcolm XML posted:

I like clojure a lot but lisps are just annoying to work with

Same. Every time I try to learn a LISP my eyes defocus and I have to give up.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Cybernetic Vermin posted:

i largely agree, but then 'innovation' is really far down on the list of important pl features outside of this thread

was largely the point of that twitter thread alsp; that it is fine'ish that rust is more unstable (spec- and implementation-wise) since it is more innovative/ambitious than clojure

yeah. clojure has a straightforward design philosophy which it deserves credit for pursuing. following that design philosophy is a fine way to solve a certain kind of problem which is well-suited to the jvm, which makes it an effective programming language even if it's all just modest extensions of ideas from older languages. i'm sure their jvm-hosted stm performs terribly but they have a ready excuse that you should be avoiding that kind of thing anyway and relying more on immutability

havelock
Jan 20, 2004

IGNORE ME
Soiled Meat

Sapozhnik posted:

Is there a single implementation of async await where I can await A which {awaits B and then awaits C} and have an oops in C yield an actually useful stack trace instead of seeing "_internalScheduleWorkItem called B$closure02f7116c called C” or similar

Green Threads did nothing wrong

C# is verbose, but you get useful info from it (along with the garbage)
code:
public async Task<int> GetInt() { await Task.Delay(500); throw new InvalidOperationException("oops"); return 5; }
public async Task<int> GetInt2() { var result = await GetInt(); return result; }
public async Task<int> GetInt3() { var result = await GetInt2(); return result; }
try { var x = await GetInt3(); } catch(Exception ex) { Console.WriteLine(ex.StackTrace); }
in the REPL gives you

pre:
at Submission#0.<GetInt>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#1.<GetInt2>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#2.<GetInt3>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Submission#4.<<Initialize>>d__0.MoveNext()
It looks like the auto-generated state machine stuff at least uses the real method name in its name so you can see what has happened.

havelock fucked around with this message at 03:38 on Dec 20, 2018

Nomnom Cookie
Aug 30, 2009



Cybernetic Vermin posted:

never done anything in clojure, but one of those i follow since it really comes off as a really sensible project, one can take issue with the basic choices (dynamic, lisp), but from there the design is intelligently driven

clojure.spec for example is quite neat

clojure gets the Kevin Mitnick P.E. Memorial Award for most reasonable crackpot plang

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

Kevin Mitnick P.E. posted:

Kevin Mitnick P.E. Memorial Award
i didn't realize you named your turds

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


Sagacity posted:

i didn't realize you named your turds

we all like to name our posts from time to time

AWWNAW
Dec 30, 2008

Clojure is good actually maybe the best dynamic Lang. I always hated python and Javascript but this ones good y’all.

ignore the weird obsession with hickey and pray you never inherit someone else’s giant lisp project

Nomnom Cookie
Aug 30, 2009



Sagacity posted:

i didn't realize you named your turds

only the ones that don't want to go down so i have to get a plastic knife from the kitchen and murder it to death

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Cybernetic Vermin posted:

i largely agree, but then 'innovation' is really far down on the list of important pl features outside of this thread

"innovation" is a cost required to solve a problem, not a feature

it's really easy to make a PL that does a bunch of wacky new things that no one has done in a PL before. the hard part of PL design is solving the problems that existing languages have while minimizing the number of new concepts and ideas that users have to learn to use it.

clojure's core idea is to take an existing good language that isn't widely used, and make it run on a widely used good platform. in an ideal world, this would be entirely gruntwork with no design required; in practice there were a bunch of impedance mismatches that they had to sort out, but nothing particularly novel. coming up with novel solutions to this problems would have just made clojure worse and been a distraction from what they were actually trying to do, which was to create a practical language for writing real software in. it's sort of nonsensical to even compare it to rust, which spent years as a research language and was nearly a decade old before finally becoming something intended for actually writing software.

Notorious b.s.d.
Jan 25, 2003

by Reene
the main insight in clojure was that they could abandon common lisp compatibility to enable higher performance and new features

there had been prior (modestly successful) attempts to do lisp on the jvm, like abcl, but common lisp compat was an anchor dragging them down

clojure abandoned some of the good things in lisp, but in return, achieved better java interop and a better mapping to the underlying features of the jvm

creatine
Jan 27, 2012




I am currently learning java to make a plugin for a program we use at work and I am in hell

Not because java but because there is basically 0 documentation for the program

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
clojure is kinda like lisp but you have different kinds of parens instead of just the one

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


creatine posted:

I am currently learning java to make a plugin for a program we use at work and I am in hell

Not because java but because there is basically 0 documentation for the program

who has time for documentation? move fast, break things

cinci zoo sniper
Mar 15, 2013




Boiled Water posted:

who has time for documentation? move fast, break things

are you our lead systems architect

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


cinci zoo sniper posted:

are you our lead systems architect

can't be, from what you've previously posted your technical colleagues are the four horsemen

Soricidus
Oct 21, 2010
freedom-hating statist shill

cinci zoo sniper posted:

are you our lead systems architect

i'm pretty sure the only thing we hired a lead systems architect for was to install the drinking water pipes

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


is all of yospos working in the same building and bringing drinks from home?

cinci zoo sniper
Mar 15, 2013




Boiled Water posted:

is all of yospos working in the same building and bringing drinks from home?

i had to do relationship management with our water cooler bottle supplier, but that did pay off so we now have water in office

cinci zoo sniper
Mar 15, 2013




and by that i mean our office admin of the time hosed up so badly that i literally had to go behind their back and deal with the account manager from supplier side directly, to resolve such complex task as arranging fortnightly delivery of 35 gallons of water on thursdays

Workaday Wizard
Oct 23, 2009

by Pragmatica

DELETE CASCADE posted:

clojure is kinda like lisp but you have different kinds of parens instead of just the one

http://clochure.org/ :mrgw:

quote:

You can find thousands of iOS developers that can jump right on to Clochure Projects.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

cinci zoo sniper posted:

and by that i mean our office admin of the time hosed up so badly that i literally had to go behind their back and deal with the account manager from supplier side directly, to resolve such complex task as arranging fortnightly delivery of 35 gallons of water on thursdays

I think you mean semibiweekly

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Soricidus posted:

i'm pretty sure the only thing we hired a lead systems architect for was to install the drinking water pipes

I appreciate this

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Soricidus posted:

i'm pretty sure the only thing we hired a lead systems architect for was to install the drinking water pipes

cinci zoo sniper
Mar 15, 2013




omg i just got it :eyepop:

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
the english language sucks

Adbot
ADBOT LOVES YOU

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Wheany posted:

the english language sucks

Does not it?

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