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
mystes
May 31, 2006

the talent deficit posted:

i thought they were removing nashorn because the graalvm js implementation is just better?
Have they actually said this or are you just going based on the blog article the graalvm people posted saying "hey now that Nashorn is going away you should use the graalvm js implementation"?

Adbot
ADBOT LOVES YOU

CPColin
Sep 9, 2003

Big ol' smile.
c gently caress Groovy s:

Groovy considers empty lists and strings falsey so you can do "if (!list)" instead of "if (list == null || list.empty())" or whatever. This means you can return the first element of a list by doing this: "return list ? list.first() : null"

"Wait," you say. "I've seen this pattern before. This is where we're supposed to use the ?. operator, right?"

Well "return list?.empty()" fails because ?. only cares about the nullity, not the truthiness. So now you get to see that line of code that really looks like it wants to use a ?. operator, but it can't. You're tempted to leave a comment explaining why it can't, but uuuugh.

I miss Ceylon's "List.first" and "List.get()" having the type "Element?" and never throwing an exception for being out of bounds.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Thermopyle posted:

I've used bounty source many times to get someone to fix things in various open source projects.

Just open an issue or tack in to an existing issue and set up a bounty for it.

If I had infinite dollars I'd do that all the time because it feels nice to give back and to get my poo poo fixed.

cool. so it’s a really good experience as a “client”? any frustration from bounties that never actually happen? disputes over achievement? any sense of how project people feel about it? does it draw in different contributors?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Sometimes it's a little unclear what counts as finished, so you've got to really specify that. Otherwise I've never seen any complaints about it from project owners or people getting paid.

I almost always have other people watching the issue end up contributing to the bounty as well, so that's nice.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Sometimes I'll post the bounty issue on other forums that might have interested contributors and I've got people coming in from those forums.

comedyblissoption
Mar 15, 2006

CPColin posted:

c gently caress Groovy s:
has there ever been a situation in the history of programming languages where implicitly coercing non-boolean values to true or false was a good idea

I feel like the ?. operator wouldn't even need to exist if tony hoare's b^Htrillion dollar mistake was not repeated ad infinitum

b0lt
Apr 29, 2005

rjmccall posted:

does anyone here have experience with open-source (non-security-limited) bounty / crowdfunding programs? something like bountysource or i guess just kickstarter or gofundme or whatever

swift's accumulating a not-insubstantial non-apple contributor base and there's interest in the community in sponsoring them to work on specific things. (naturally some of that is like "you have to write a portable ide from scratch in swift or else the whole project will be a total loving failure" but my read is that there's also a lot of interest in more feasibly-scoped projects)

open source bounties are usually comical because people offer like $15 for plural hours of effort, so it's literally worse than not offering a bounty in the first place. presumably apple isn't going to be that dumb?

Notorious b.s.d.
Jan 25, 2003

by Reene

the talent deficit posted:

i thought they were removing nashorn because the graalvm js implementation is just better?

graal still isn't in an official jdk release. nor, so far as i know, is there a jsr for it.

i am starting to worry that it is not going to be a part of a real jdk

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The biggest bounty I'm aware of was $500 for basically someone to come in and rewrite a large subsystem in an emulator (something about open source nerds having to steal content made for better operating systems goes here). Anyone knowledgeable enough to try knew how miniscule that amount was for the amount of work, so the project was littered with tons of bad attempts for the $500 that caused several on the core team to quit over being pressured to code review this thing and merge a broken branch constantly.

If you think design-by-committee is bad, wait until you see design-by-bounty.

CPColin
Sep 9, 2003

Big ol' smile.

comedyblissoption posted:

has there ever been a situation in the history of programming languages where implicitly coercing non-boolean values to true or false was a good idea

I feel like the ?. operator wouldn't even need to exist if tony hoare's b^Htrillion dollar mistake was not repeated ad infinitum

I can't think of one. It just encourages the sloppiest of idioms, to the point where you see code like in my example and think it needs to look more idiomatic and suddenly you're trying to call first() on an empty list and your code blows up.

I wish Ceylon's ecosystem were a little healthier, so I could advocate for it more. (It just moved to the Eclipse Foundation and has kind of been stuck, gearing up for a binary-incompatible release, with very few commits going on.)

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

comedyblissoption posted:

has there ever been a situation in the history of programming languages where implicitly coercing non-boolean values to true or false was a good idea

I feel like the ?. operator wouldn't even need to exist if tony hoare's b^Htrillion dollar mistake was not repeated ad infinitum

mumps has the ultimate bad take on bools and coersion. everything is implicitly typed by usage. numerics <=0 are false, >=1 are true, strings are coerced into numbers and then evaluated. on top of that, boolean evaluations are secretly a non-atomic set and then test on the secret global $T variable. An example (note that mumps comments begin with semicolons):

code:
;This code example will walk you through some of the
;inane bullshit resulting from coersion and $T
;i'm gonna use the full all-caps versions of the various
;mumps commands since the more common single-letter
;versions always confuse people
;
thisTagIsNotBroken NEW foo
 SET foo=1
 IF 'foo DO clobberDoIT^THISROUTINE ;' == ! btw
 ELSE 
 .WRITE "i elsed"
 QUIT
;So this tag is the normal bool eval you expect.
;it will print "i elsed"
;
thisTagIsNotBrokenButItsWeird NEW foo
 SET foo="1string"
 IF 'foo DO clobberDoIt^THISROUTINE
 ELSE
 .WRITE "i elsed"
 QUIT
;This tage coerces "1string" to a number, truncing it to 1,
; then nots it, turning it to 0. this sets $T to 0 because
; that's essentially the same as "if false"
; so this tag also just prints "i elsed"
;
thisTagIsBroken NEW foo
 SET foo=1
 IF foo DO clobberDolT^THISROUTINE ; foo is 1, so $T is set to 1, so we do the tag
 ELSE ;clobberDolT set $T to 0 with its bogus IF, ELSE is satisfied so we enter the else block
 .WRITE "why am i here?" ;this prints
 QUIT
;This tag will always execute both sides of the if-else
;because the global truth variable gets clobbered inside the DO
;resulting in the ELSE reading that false state and executing
;
thisTagIsFixedByIDIOMS NEW foo
 SET foo=1
 IF foo DO clobberDolT^THISROUTINE IF 1 ;IF 1 doesn't execute if the initial if fails
 ELSE
 .WRITE "i can't get here"
 QUIT
;The "i 1" idiom is a defensive coding practice to save you from your d blocks
;clobbering $T. If a boolean evaluation is false, the rest of the line is skipped
;but if it's true, the DO is executed and then we return to the line afterward
;and execute the "i 1", setting $T to 1 and ensuring we don't fall thorugh
;to the ELSE. this bites people so much that Epic's custom in-house linter
;won't let you check in code without this idiom


clobberDolT
 IF 0=1
 QUIT

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Thermopyle posted:

Sometimes it's a little unclear what counts as finished, so you've got to really specify that. Otherwise I've never seen any complaints about it from project owners or people getting paid.

I almost always have other people watching the issue end up contributing to the bounty as well, so that's nice.

thanks, that's really helpful

b0lt posted:

open source bounties are usually comical because people offer like $15 for plural hours of effort, so it's literally worse than not offering a bounty in the first place. presumably apple isn't going to be that dumb?

i mean this is not apple, apple funds swift development by employing like fifty people to work on various aspects of it (which is not nearly enough) and of course it's a part of our jobs to help out external contributors so that's a pretty meaningful kind of open-source funding. this is more like "someone else wants a minor language feature but doesn't want to wade through the evolution process and learn how to write a compiler in c++". and yeah, bounties being comically low is probably the biggest concern here, although swift is a relatively major project so maybe it wouldn't completely languish?

VikingofRock
Aug 24, 2008




yesssss the return of mumpsposting

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

VikingofRock posted:

yesssss the return of mumpsposting

b0lt
Apr 29, 2005

jit bull transpile posted:

numerics <=0 are false, >=1 are true, strings are coerced into numbers and then evaluated

what is 0.5

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
that is definitely some sort of programming language semantics right there

Maximum Leader
Dec 5, 2014

b0lt posted:

what is 0.5

maybe neither?

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


Maximum Leader posted:

maybe neither?

bool?

yes

Xarn
Jun 26, 2015

rjmccall posted:

that is definitely some sort of programming language semantics right there

Xarn
Jun 26, 2015
From the opposite side, about a month ago I thought about establishing our project on those oss bounty sites, and after looking at the issues and bounties, and with very specific exceptions, the $$ bounties were laughably low even for someone who lives in eastern Europe.

The exceptions were company paid things like "add simd support to pypy", which probably still were laughably small for the effort unless you already were core developer.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

b0lt posted:

what is 0.5

I can't remember. I write Hadoop now.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

b0lt posted:

what is 0.5

FileNotFound

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

carry on then posted:

FileNotFound

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



thats 4.04

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

i'm sorry the bad people did this to you

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

nashorn replaced rhino, but now they are questioning the wisdom of including any js runtime at all

since i never really understood it myself, i guess i'm ok with it

our use case is adding scripting for users to extend a product. you want the scripting language to be something people might know already, which basically means python or javascript these days. but jython is permastuck on python 2 and also has absolutely terrible performance and barely supports java 8 even, so nashorn was the best option while it lasted

Notorious b.s.d.
Jan 25, 2003

by Reene

Soricidus posted:

our use case is adding scripting for users to extend a product. you want the scripting language to be something people might know already, which basically means python or javascript these days. but jython is permastuck on python 2 and also has absolutely terrible performance and barely supports java 8 even, so nashorn was the best option while it lasted

well there are lots of bridges to/from java and other languages

just, you have to distribute two runtimes. one for java, one for the target language. which sucks if you have zero control over deployment

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

well there are lots of bridges to/from java and other languages

just, you have to distribute two runtimes. one for java, one for the target language. which sucks if you have zero control over deployment

yeah, we’ve experimented with things like jpype and they look promising but are a pain to deploy compared to literally no effort for nashorn, or just bunging another jar in with all the others for jython

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

Soricidus posted:

so nashorn was the best option while it lasted
The best technical option, maybe. The best overall option in that situation is, of course, to fake your death and move to Belize.

Notorious b.s.d.
Jan 25, 2003

by Reene

Soricidus posted:

yeah, we’ve experimented with things like jpype and they look promising but are a pain to deploy compared to literally no effort for nashorn, or just bunging another jar in with all the others for jython

if you want to just bang in a jar, rhino is still kinda/sorta supported by mozilla

it at least gets bugfixes

Notorious b.s.d.
Jan 25, 2003

by Reene

Peeny Cheez posted:

The best technical option, maybe. The best overall option in that situation is, of course, to fake your death and move to Belize.

i wanted to disagree but after thinking about it i am pretty sure you are right

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Notorious b.s.d. posted:

if you want to just bang in a jar

:smuggo:

Notorious b.s.d. posted:

rhino is still kinda/sorta supported by mozilla

:smugjones:

Cybernetic Vermin
Apr 18, 2005

the fact that the issues with embedding python as a scripting language stem rather directly from the breaking changes the maintainers forced through should make you weary of jumping through complicated hoops to embed the changed version. i at least would worry about the future maintainability of the thing

a sad state of affairs when javascript is the only other option, but you'll be drowning in quite compatible options on that front

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


Cybernetic Vermin posted:

the fact that the issues with embedding python as a scripting language stem rather directly from the breaking changes the maintainers forced through should make you weary of jumping through complicated hoops to embed the changed version. i at least would worry about the future maintainability of the thing

a sad state of affairs when javascript is the only other option, but you'll be drowning in quite compatible options on that front

there is that other alternative for embedded things

it's just, it's c++ and calling it an alternative might be a stretch

Cybernetic Vermin
Apr 18, 2005

only other alternative from what Soricidus listed i should say. without that constraint i think i'd toss in groovy and be done, if i was just expected to provide something maintainable/accessible (and wasn't a primary user of the extension system myself)

Feisty-Cadaver
Jun 1, 2000
The worms crawl in,
The worms crawl out.
they should just include js polyfills or w/e the gently caress it's called in the JVM and be done with it.

bing bang badda boom support for new js

(we did just this for a thing and it works fine) plus i'll be dead before we upgrade to jdk11 so meh

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum
don’t people embed lua into applications a lot? I think the wow ui is all lua

cinci zoo sniper
Mar 15, 2013




Sweeper posted:

don’t people embed lua into applications a lot? I think the wow ui is all lua

yeah wow ui is entirely in lua

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009
If your budget is > 15$ per board, there's no excuse to not run embedded Linux these days. That price point get's you 1Ghz+, 512Mb of ram, and 8GB of eMMC.

At that point, choose whatever language you drat well please.

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