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
Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.
Themed codebases are the worst.

Adbot
ADBOT LOVES YOU

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.
Wix is themed around candles.

Rob Mensching should be buried under a pile of .wxs printouts and burned alive.

Athas
Aug 6, 2007

fuck that joker
It's often a good idea to build the internal structures of a program to imitate some real-world metaphor. But not this metaphor.

Carthag Tuek
Oct 15, 2005

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




:psyboom:

Doom Mathematic
Sep 2, 2008
Thankfully, metaphors always fail eventually. Hopefully.

redleader
Aug 18, 2005

Engage according to operational parameters

Corla Plankun
May 8, 2007

improve the lives of everyone
maybe its a satirical criticism of all the other problematic compsci metaphors out there already

Nitevision
Oct 5, 2004

Your Friendly FYAD Helper
Ask Me For FYAD Help
Another Reason To Talk To Me Is To Hangout

suffix
Jul 27, 2013

Wheeee!

there should be a horror game where all you do is dig deeper and deeper into a git repo to try to understand the twisted motivations of the coder

gonadic io
Feb 16, 2011

>>=
https://twitter.com/pasiphae_goals/status/923821586213457920

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

:psyduck:

Carthag Tuek
Oct 15, 2005

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




im the golang person that writes everyhting with only As or Zs because i have to and then tells real people its actually a neat trick

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

click the "27 Oct" in the top/small tweet and read the whole thread. it's amazing

https://twitter.com/pasiphae_goals/status/923857335482798085

e: :lol:

https://twitter.com/Sajma/status/924016544622968832

Lutha Mahtin fucked around with this message at 05:05 on Oct 30, 2017

Sapozhnik
Jan 2, 2005

Nap Ghost
https://twitter.com/pasiphae_goals/status/923823320465801216

er

isn't that called "not equals"

Sapozhnik
Jan 2, 2005

Nap Ghost
https://twitter.com/pasiphae_goals/status/923845173393715201

NaNs don't work that way.

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench


there is a defined meaning for xor for booleans. the result is the same as != BUT there's no reason that bool ^ bool should be left out just because the result is the same as bool != bool.

Lime
Jul 20, 2004

https://twitter.com/pasiphae_goals/status/923825497083187201

can someone explain this one to me? not sure i am understanding the use of euclidean domain here but i think she is referring to this part of the go spec

quote:

If the dividend is non-negative and the divisor is a constant power of 2, the division may be replaced by a right shift, and computing the remainder may be replaced by a bitwise AND operation:
code:
 x     x / 4     x % 4     x >> 2     x & 3
 11      2         3         2          3
-11     -2        -3        -3          1

and yeah if you did this for a negative dividend then you wouldn't have (quotient * divisor + remainder = dividend) by that's why it specifically says non-negative dividends, where bit shifting and masking is just an exactly equivalent optimization, so i don't know idgi

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Lime posted:

https://twitter.com/pasiphae_goals/status/923825497083187201

can someone explain this one to me? not sure i am understanding the use of euclidean domain here but i think she is referring to this part of the go spec


and yeah if you did this for a negative dividend then you wouldn't have (quotient * divisor + remainder = dividend) by that's why it specifically says non-negative dividends, where bit shifting and masking is just an exactly equivalent optimization, so i don't know idgi

it's one of those "oh it's nicer if we do it this way" in math, so you usually restrict the remainder to be nonnegative.

it's like as if you made sqrt(4) == -2, it's not technically wrong but... why are you going against the most natural convention?


edit: but tbf go is doing what most programming languages do, very few languages actually stick with the euclidean domain definition:

https://en.wikipedia.org/wiki/Modulo_operation#Remainder_calculation_for_the_modulo_operation


fake edit2: the more I read the tweet the less I understand what it's really about

Symbolic Butt fucked around with this message at 07:24 on Oct 30, 2017

tef
May 30, 2004

-> some l-system crap ->

you have to do x != x, helpfully

tef
May 30, 2004

-> some l-system crap ->
it's a functional programmer sneering at a lesser language through the time honoured method of shitposting

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
there's no reason for that thing about div/mod to be in the spec at all. it's just didactically informing you, the sort of ignorant and inferior coder who uses go, that certain cases of integer division can be implemented without using a full divide instruction. (incidentally this is true of i believe all constant divisors, it's just not always as cheap as a shift.) if go used shifts for all divisions by a constant power of two regardless of sign, that would be important to include in the spec. or if go guaranteed the use of a shift to implement a divide of an unsigned type by a constant power of two, i... well, you could justify putting that in the spec i guess maybe but it would still be weird. but it's absolutely just embarrassing amateurishness from someone on the go team (it's rob pike)

but pasiphae_goals just seems to be using big words that she doesn't understand here, and this isn't the only example in her tweetstorm. some of them are kinda funny, but overall it's a pretty bad look

Workaday Wizard
Oct 23, 2009

by Pragmatica
:justpost:

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

rjmccall posted:

there's no reason for that thing about div/mod to be in the spec at all. it's just didactically informing you, the sort of ignorant and inferior coder who uses go, that certain cases of integer division can be implemented without using a full divide instruction. (incidentally this is true of i believe all constant divisors, it's just not always as cheap as a shift.)

it's often 1 multiply by a precalculated magic constant followed by a shift, with cases where more ops are required

http://ridiculousfish.com/blog/posts/labor-of-division-episode-i.html

(lol that anything like this made it into the spec. a competently written spec would be pared down to the minimal amount of language to clearly & unambiguously define the language. bad lectures on peephole optimization tricks that the spec part of the spec allows a compliant go compiler to use are completely out of place)

(i really just wrote this reply to link to ridiculous fish's blog post, which is a p. great read if you're interested in this topic)

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
At best, it's telling sophomoric coders who might be tempted to hand-optimize that the compiler devs already thought of that.

CPColin
Sep 9, 2003

Big ol' smile.
I saw a guy recently asking how to go about generating custom JVM bytecode for something so he could optimize some function he wrote that was too slow or something. You know, because the JVM itself isn't going to move poo poo around and JIT-compile things. Sure enough, a while later, he did a benchmark and admitted his hand-rolled bytecode didn't actually help anything, because the JIT-optimized version was just as good.

redleader
Aug 18, 2005

Engage according to operational parameters
he admitted he was wrong though. that's progress!

Cybernetic Vermin
Apr 18, 2005

Gazpacho posted:

At best, it's telling sophomoric coders who might be tempted to hand-optimize that the compiler devs already thought of that.

there are three levels to this though: i) being the sophomoric coder hand-optimizing what the compiler does to the detriment of the program; ascension yielding; ii) being the enlightened idiot coder, who blindly believes the compiler is better than what they can achieve themselves; ascending into; iii) the enlightened husk coder, who understands the compiler is dumb as a pile of bricks and anyone with a bit of time and systematic thinking can output better code, but actually it'd be largely pointless to do so, and really all of our existence is a bland stain on reality, the only moral thing being to do as little as possible

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

redleader posted:

he admitted he was wrong though. that's progress!

for real that sounded like an interesting and mildly humbling learning experience. if it were me I’d head home feeling productive that day

sarehu
Apr 20, 2007

(call/cc call/cc)
Holy gently caress that spec. The implementation may replace the division with a shift that creates different behavior. It would make sense to mandate the optimization with no semantic difference in behavior, and I thought you might be complaining about that.

Integer division with negative divisors should throw an exception.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
ah, the eternal struggle of those who want their code executed by something other than a CPU

sarehu
Apr 20, 2007

(call/cc call/cc)
If your code isn't executed by the Urbit virtual machine you're a slave to Mammon.

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?
your language should fully model mathematics and include a property numeric tower

but it should also be able to restrict types to ranges that make for good optimization, e.g. integers between 0 and 255 or really any other range (or other type constraint, for that matter)

also it should have lots of parentheses

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

sarehu posted:

Holy gently caress that spec. The implementation may replace the division with a shift that creates different behavior. It would make sense to mandate the optimization with no semantic difference in behavior, and I thought you might be complaining about that.

it doesn't create different behavior tho

sarehu
Apr 20, 2007

(call/cc call/cc)
Oh, "If the dividend is non-negative." I can't read.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

shut up shrughes

sarehu
Apr 20, 2007

(call/cc call/cc)
Are you fat?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

no im the sickly thin kind of nerd

suffix
Jul 27, 2013

Wheeee!
idk if this will happen but it is pleasing http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html

what if instead of rewriting everything to put random async keywords everywhere we juts let people use all their old code and it worked
like goroutines but in a 90s language instead of an 80s one so you actually have decent concurrency primitives

Soricidus
Oct 21, 2010
freedom-hating statist shill

suffix posted:

idk if this will happen but it is pleasing http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html

what if instead of rewriting everything to put random async keywords everywhere we juts let people use all their old code and it worked
like goroutines but in a 90s language instead of an 80s one so you actually have decent concurrency primitives

oh god i'd love it if they added coroutines. the lack of generators is a constant annoyance in java

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
i think async/await keywords are useful visual markers but omg yes coroutines (or "fibers" or wtfever you want to call them) are something that really ought to be in any modern language that ever interacts with a network socket

or does any sort of io at all really

here's hoping it gets into java 10

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