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
tef
May 30, 2004

-> some l-system crap ->
rip thread

Adbot
ADBOT LOVES YOU

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 worked around a re-entrancy bug in the version of fcvtbuf that shipped with arm gcc 4.4.1 last week by rewriting a domain-limited version of it since i didn't have the source handy. saved 7.5k. didn't wind up using the white/steel algorithm since pulling in an arbitrary precision arithmetic library was a no-go. validation was a bitch

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
also, has anybody seen BONUS lately?

Soricidus
Oct 21, 2010
freedom-hating statist shill

tef posted:

rip thread

I often wish they would, but for some algorithms it's worth putting up with all the problems of shared memory concurrency

triple sulk
Sep 17, 2014



dpweb 1 minute ago | link

Couldn't you charge people to look at their pull requests? The contributor's fix may seem very important to them, but in actuality may or may not be of any value at all.
They are using free software but asking the maintainers of it to spend their time to review their pull request. Some entitlement there. The justification, my fix is important. Well, we don't know that, and to determine it costs time.
I would think a fee system where people pay to have their pull requests prioritized. I know it goes against this misguided idea that everything free is a virtue, but there is a good reason why some things have an associated cost involved.
reply

akadajet
Sep 14, 2003

triple sulk posted:

dpweb 1 minute ago | link

Couldn't you charge people to look at their pull requests? The contributor's fix may seem very important to them, but in actuality may or may not be of any value at all.
They are using free software but asking the maintainers of it to spend their time to review their pull request. Some entitlement there. The justification, my fix is important. Well, we don't know that, and to determine it costs time.
I would think a fee system where people pay to have their pull requests prioritized. I know it goes against this misguided idea that everything free is a virtue, but there is a good reason why some things have an associated cost involved.
reply

lol

Deacon of Delicious
Aug 20, 2007

I bet the twist ending is Dracula's dick-babies
charge people a fee to consider their ideas, but please consider mine for free

Sapozhnik
Jan 2, 2005

Nap Ghost
ugh, thanks PL thread for getting monads stuck in my head now i just accidentally built a loving monad in Java. i think.

i'm doing some layer-izing of Java code. i have a factory type T that constructs implementations of various interfaces A, B, C

so then i made a factory class, say, T' that still constructs implementations of A, B, C using the instance of T it's given and then wraps each of them in adapter classes A' B' C' which also implement the A, B, and C interfaces by calling down to their wrapped A, B, C-implementing objects but then decorating them in various ways.

it got to the point where i was factorising each of those wrapping operations into an instance of a helper class that took a "construct" lambda and a "wrap" lambda and i was like "..............wait a minute. PL THREAD! :doom:"






what i really learned was that i'm overdesigning the gently caress out of this and it's going to be completely incomprehensible and i should just bake all this poo poo into the implementations of A, B, C to begin with.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Mr Dog posted:

ugh, thanks PL thread for getting monads stuck in my head now i just accidentally built a loving monad in Java. i think.

i'm doing some layer-izing of Java code. i have a factory type T that constructs implementations of various interfaces A, B, C

so then i made a factory class, say, T' that still constructs implementations of A, B, C using the instance of T it's given and then wraps each of them in adapter classes A' B' C' which also implement the A, B, and C interfaces by calling down to their wrapped A, B, C-implementing objects but then decorating them in various ways.

it got to the point where i was factorising each of those wrapping operations into an instance of a helper class that took a "construct" lambda and a "wrap" lambda and i was like "..............wait a minute. PL THREAD! :doom:"






what i really learned was that i'm overdesigning the gently caress out of this and it's going to be completely incomprehensible and i should just bake all this poo poo into the implementations of A, B, C to begin with.

A monad is a generic type with 3 operations:

map, join and return

does your type implement these?

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Malcolm XML posted:

A monad is a generic type with 3 operations:

map, join and return

does your type implement these?

merely wrapping and unwrapping does not a monad make

sarehu
Apr 20, 2007

(call/cc call/cc)

akadajet posted:

lmao

Lojban 25th Anniversary celebration, 2013, Fairfax, Virginia, USA.

I see a Gandalf, Legolas, and a Gimli, but which one's the Aragorn?

FamDav
Mar 29, 2008

sarehu posted:

I see a Gandalf, Legolas, and a Gimli, but which one's the Aragorn?

red sweater

UncleBlazer
Jan 27, 2011

Malcolm XML posted:


map, join and return

Wouldn't it be bind and return? Join plays a bigger part in free monads but isn't super necessary and map I assume you're talking about a morphism as a functor?

gonadic io
Feb 16, 2011

>>=

UncleBlazer posted:

Wouldn't it be bind and return? Join plays a bigger part in free monads but isn't super necessary and map I assume you're talking about a morphism as a functor?

bind f m = join (map f m)
join = bind id

most math stuff i've seen uses join + map but in actual programming bind is used way more than join

and ya, the map here is the functor one

FamDav
Mar 29, 2008

AlsoD posted:

bind f m = join (map f m)
join = bind id

most math stuff i've seen uses join + map but in actual programming bind is used way more than join

and ya, the map here is the functor one

can you define return in terms of join+map? i think you need return and bind or join+map.

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
could you not

theadder
Dec 30, 2011


hackbunny posted:

could you not

no they will not

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
what is the point of join at all if it's just bind id?

e: this probably belongs in the safezone :shobon:

my homie dhall fucked around with this message at 03:38 on Dec 8, 2014

Bloody
Mar 3, 2013

theadder posted:

no they will not

:xd:

raminasi
Jan 25, 2005

a last drink with no ice

Ploft-shell crab posted:

what is the point of join at all if it's just bind id?

e: this probably belongs in the safezone :shobon:

because "you can define monads in terms of map and bind id" is kind of a silly characterization

Kathleen
Feb 26, 2013

Grimey Drawer

akadajet posted:

Nah, there are other ways to achieve "the look"

http://www.malevole.com/mv/misc/killerquiz/ (warning: flash)

i got 4/10 :(

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Mr Dog posted:

ugh, thanks PL thread for getting monads stuck in my head now i just accidentally built a loving monad in Java. i think.

i'm doing some layer-izing of Java code. i have a factory type T that constructs implementations of various interfaces A, B, C

so then i made a factory class, say, T' that still constructs implementations of A, B, C using the instance of T it's given and then wraps each of them in adapter classes A' B' C' which also implement the A, B, and C interfaces by calling down to their wrapped A, B, C-implementing objects but then decorating them in various ways.

it got to the point where i was factorising each of those wrapping operations into an instance of a helper class that took a "construct" lambda and a "wrap" lambda and i was like "..............wait a minute. PL THREAD! :doom:"






what i really learned was that i'm overdesigning the gently caress out of this and it's going to be completely incomprehensible and i should just bake all this poo poo into the implementations of A, B, C to begin with.

gently caress you


Malcolm XML posted:

A monad is a generic type with 3 operations:

map, join and return

does your type implement these?

gently caress you


UncleBlazer posted:

Wouldn't it be bind and return? Join plays a bigger part in free monads but isn't super necessary and map I assume you're talking about a morphism as a functor?

gently caress you



AlsoD posted:

bind f m = join (map f m)
join = bind id

most math stuff i've seen uses join + map but in actual programming bind is used way more than join

and ya, the map here is the functor one

gently caress you


FamDav posted:

can you define return in terms of join+map? i think you need return and bind or join+map.

gently caress you


Ploft-shell crab posted:

what is the point of join at all if it's just bind id?

e: this probably belongs in the safezone :shobon:

gently caress you


GrumpyDoctor posted:

because "you can define monads in terms of map and bind id" is kind of a silly characterization

gently caress you

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Wheany posted:

gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you

gonad

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Wheany posted:

gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you

:agreed:

Zombywuf
Mar 29, 2008

Soricidus posted:

cjk unification is fine. the only objection to it is "unicode doesn't distinguish between the 9-stroke 草 traditionally used in japan and the 10-stroke 草 traditionally used in china", which sometimes seems valid to westerners until they realise that it's equivalent to complaining that unicode doesn't distinguish between open and closed variants of the glyph 4. specify a font if the precise shape of the glyph matters, that's not what character encodings are for.

Stroke count is important https://en.wikipedia.org/wiki/Collation#Radical-and-stroke_sorting

And yeah, unicode's handling of alphabets is wildly inconsistent. Take a look at what they consider to be letters in Hungary some time.

Chill Callahan
Nov 14, 2012

Wheany posted:

gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you


gently caress you

JewKiller 3000
Nov 28, 2006

by Lowtax
monads are not particularly interesting theoretical objects. the only reason anyone cares about them is because of haskell and its lazy evaluation, and the only monad that haskellers really care about is the IO monad. when they observe that lots of other things "are monads" too, they're doing that to make themselves feel better about needing the IO monad. it's a hack, and haskellers need to feel elegant like pretty princesses

Notorious b.s.d.
Jan 25, 2003

by Reene

akadajet posted:

Nah, there are other ways to achieve "the look"

http://www.malevole.com/mv/misc/killerquiz/ (warning: flash)

arguably a lot of today's (relatively) successful programmers might have been social deviants 40+ years ago

IT work contains some pretty high-paying high-prestige jobs for some people who would otherwise be sweeping floors, avoiding eye contact, and torturing animals in basements

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

JewKiller 3000 posted:

monads are not particularly interesting theoretical objects. the only reason anyone cares about them is because of haskell and its lazy evaluation, and the only monad that haskellers really care about is the IO monad. when they observe that lots of other things "are monads" too, they're doing that to make themselves feel better about needing the IO monad. it's a hack, and haskellers need to feel elegant like pretty princesses

yes to the reason people care is haskell part, no to the rest

JewKiller 3000
Nov 28, 2006

by Lowtax

fart simpson posted:

i'm a haskell programmer

distortion park
Apr 25, 2011


what about computation expressions in f# they look cool

JewKiller 3000
Nov 28, 2006

by Lowtax

pointsofdata posted:

what about computation expressions in f# they look cool

they are cool, but they're just a syntax extension on top of a standard interface style, which can be and is used in other similar languages with higher-order functions and parametric polymorphism.

you could rewrite the standard library of ocaml or standard ML to use monadic style. we don't do that because it sucks. haskell has to do it.

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
I'm doing a little Python demo today, any suggestions for neat things to show ruby and Java devs

current flow is gonna be an overall about the lang, nice stuff about expressions, context managers and decorators then an ipython notebook and flask demo

Convoolio
Oct 31, 2005

ahmeni posted:

I'm doing a little Python demo today, any suggestions for neat things to show ruby and Java devs

current flow is gonna be an overall about the lang, nice stuff about expressions, context managers and decorators then an ipython notebook and flask demo

You reminded me about context managers and I immediately used it in my project, ha ha

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

JewKiller 3000 posted:

monads are not particularly interesting theoretical objects. the only reason anyone cares about them is because of haskell and its lazy evaluation, and the only monad that haskellers really care about is the IO monad. when they observe that lots of other things "are monads" too, they're doing that to make themselves feel better about needing the IO monad. it's a hack, and haskellers need to feel elegant like pretty princesses

what is monad? can any1 explain it 2 me

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

KARMA! posted:

what is monad? can any1 explain it 2 me

http://www.tmk.com/ftp/humor/macburrito.txt

Shaggar
Apr 26, 2006

KARMA! posted:

what is monad?

nobody really knows.

compuserved
Mar 20, 2006

Nap Ghost
would someone please repost the link to that article / blog post that discusses how (most, all?) monad tutorials aren't helpful or useful?

sorry i'm short on details or misremembering the specifics, that's why i want to reread that blurb

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
monads are the anarcho-capitalism of functional programmers

Adbot
ADBOT LOVES YOU

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
bear with me here, anarcho-capitalists have this vision of an ideal society where things are mostly the way they are now except that there will be itemized fees on everything you take for granted, e.g. roads, law enforcement, food inspection, bankruptcy adjustment etc.

and they write all this theory on how to reconstruct everything the way it already is but without any nominal government

then you have monads which have all this theoretical literature on how they can be used to do perfectly ordinary tasks like doing one thing after another thing without formal side effects. so the same situation really

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