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
Arcsech
Aug 5, 2008

Mr Dog posted:

making it infix seems pretty cool

not sure about replacing a nice idiomatic "and_then" with gobbledygook symbols though

This was my point. ?. or whatever isn't really any better than >>=

Adbot
ADBOT LOVES YOU

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Subjunctive posted:

it also only works if you have existing functions with the right signature and behaviour, and don't require any fields to be extracted or anything to be computed specific to this application.

still, I see the appeal of optional-friendly syntax. wonder why they didn't go there; too much "put it in the library"?

well, a lot of the rust standard library seems to use this so the existing functions already have the right signature and behavior

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

fart simpson posted:

well, a lot of the rust standard library seems to use this so the existing functions already have the right signature and behavior

I was thinking more for application code than the standard library, but that's good to know.

Notorious b.s.d.
Jan 25, 2003

by Reene

CPColin posted:

The worst part of java.util.Optional is that Eclipse still can't apply @NonNull and @Nullable to it. Java 9 had better bring those annotations into the language specification.

i would be surprised if java 9 didn't turn out to be another 8-like compromise release with half the features missing

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Subjunctive posted:

I was thinking more for application code than the standard library, but that's good to know.

actually i have yet to see null anywhere in any rust code. im not sure it's even a thing. it seems to all be option types

Arcsech
Aug 5, 2008

fart simpson posted:

actually i have yet to see null anywhere in any rust code. im not sure it's even a thing. it seems to all be option types

null doesnt exist in rust. you can get null pointers by using the c ffi but that requires you to be in an "unsafe" block, which you should be using very, very rarely, and you should be checking for nulls and converting to option types as soon as possible even in that case

Max Facetime
Apr 18, 2009

Arcsech posted:

This was my point. ?. or whatever isn't really any better than >>=

or could overload operator . to check and return NULL on NULL


let's not beat around the bush, that's what we really want :D

VikingofRock
Aug 24, 2008




Max Facetime posted:

just make ?. the default dereferencing operator for nullable values and make foo(object) and object.foo() mean the same thing

now you can simply write the thing you ACTUALLY want to write:

code:

fn get_user_with_shortest_name(names: Vec<&str>) -> User {
   names.get_shortest().find_user_by_name().json_to_user()
}


I agree, it'd be nice if things like Optional could define their own operators to make code using them less verbose and more readable. Personally I would call it >>= instead of ?. but both are good.

Sapozhnik
Jan 2, 2005

Nap Ghost
why not #8==D instead

Plorkyeran
Mar 22, 2007

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

Max Facetime posted:

or could overload operator . to check and return NULL on NULL


let's not beat around the bush, that's what we really want :D

obj-c does that and it's sometimes nice. leads to a lot of awful bugs from people not used to it, but eventually you get used to writing your conditional statements to be correct if things are nil and only occasionally get awful bugs

VikingofRock
Aug 24, 2008




Mr Dog posted:

why not #8==D instead

As an infix operator? I think the 'D' at the end would lead to parsing problems since it's a valid start of an identifier. That's why Haskell won't let you define that as an infix operator, anyways.

JawnV6
Jul 4, 2004

So hot ...
lexing not parsing

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

i would be surprised if java 9 didn't turn out to be another 8-like compromise release with half the features missing

don't worry, it won't matter anyway because dumb customers will still be insisting on java 6 compatibility until the heat death of the universe

(this year we finally managed to stop having to maintain compatibility with java 5!)

Sapozhnik
Jan 2, 2005

Nap Ghost
Android is forever stuck on Java 6 now isn't it?

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

Mr Dog posted:

why not #8==D instead

with an appropriate defun and defvar, you can make this a reality!

Lisp code:
[6]> (mapcar #'8==D }{ )
("~~~~~~~~" "~~~~~~~~" "~~~~~~~~" "~~~~~~~~")

gonadic io
Feb 16, 2011

>>=
code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

Carthag Tuek
Oct 15, 2005

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



gonadic io posted:

code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

lmao

VikingofRock
Aug 24, 2008




gonadic io posted:

code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

NICE!

gonadic io
Feb 16, 2011

>>=
drat i should have made the operator use the io monad

e: the best (worst) real operator i've come across and used is <<>~, which is a lens operator meaning to combine (<>) two things, over functions (~), and return the result (the first <). i call it the tampon operator.

Soricidus
Oct 21, 2010
freedom-hating statist shill

gonadic io posted:

drat i should have made the operator use the io monad

e: the best (worst) real operator i've come across and used is <<>~, which is a lens operator meaning to combine (<>) two things, over functions (~), and return the result (the first <). i call it the tampon operator.

reminder that perl has the goatse operator =()=

Toady
Jan 12, 2009

Plorkyeran posted:

obj-c does that and it's sometimes nice. leads to a lot of awful bugs from people not used to it, but eventually you get used to writing your conditional statements to be correct if things are nil and only occasionally get awful bugs

NSParameterAssert the world

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

gonadic io posted:

code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

Notorious b.s.d.
Jan 25, 2003

by Reene

gonadic io posted:

code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

best-ever username/post combo

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

gonadic io posted:

code:
Prelude> 5 &====> Just 3
Just 5
Prelude> 3 &====> Nothing
*** Exception: this has never happened before i swear

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Why, within the current renaissance of research in continental philosophy, is there a coincidence between the structure of ontological systems and the structure of the most highly evolved technologies of post-Fordist capitalism? I am speaking, on the one hand, of computer networks in general and object-oriented computer languages (such as Java or C++) in particular and, on the other hand, of certain realist philosophers such as Bruno Latour, but also more pointedly Quentin Meillassoux, Graham Harman, and their associated school known as speculative realism. Why do these philosophers, when holding up a mirror to nature, see the mode of production reflected back at them? Why, in short, is there a coincidence between today’s ontologies and the software of big business?

In Badiou's work, I have discovered a parallel between set theory and the design of certain computer languages. His work shares much more with software and algorithmic systems than he might realize. An uncanny homology exists between key concepts in Badiou's ontology, influenced directly by set theory, and key concepts in the design of object-oriented computer languages. Indeed as computer historians attest, object-oriented computer languages were originally designed using principles gleaned from systems theory and set theory.2 This is not unimportant, given the fact that object-oriented computer languages inhabit an important niche in today's global industrial infrastructure: as software they control the new robotic automobile plants, fluidly synchronize corporate headquarters with call centers in other countries, and allow companies like Google and Facebook to process millions of requests efficiently. Is there a secret cybercapitalist core underpinning Badiou's Being and Event? Probably not. Is there a similarity between how Badiou and Java or C++ speak about the world?

leftist heap
Feb 28, 2013

Fun Shoe
i don't know what ontological means and i'm pretty sure i don't wanna

CPColin
Sep 9, 2003

Big ol' smile.
I think it has something to do with cancer

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Close your laptop tight and what do you see? A smooth outer opaque shell, hiding and housing a complex electronic machine within. With the lid down, there is little with which to interact. Pick it up, put it down, not much more. Open it again and see the situation reversed: now concave, the external surface of the machine is no longer opaque and smooth, rather it is plastered over with buttons and sockets, speakers and screens, boxes and windows, sliders and menus, clicks and drags, taps and double taps. Splayed open, the box begs to be touched, it exists to be manipulated, to be interfaced.

There are two kinds of black boxes. The first is the cipher and the second is the function. With the lid closed the laptop is a black box cipher. With the lid up, a black box function. The black box cipher is similar to Leibniz’s monad. Like the monad, the cipher ‘has no windows.’ It is a cloaked node with no external connectivity. ‘Function’ black boxes include the computer, the protocol interface, data objects, and code libraries. This new industrial scenario is one in which a great premium is placed on interface, while interiority matters very little, assuming of course that everything is in its place and up and running. These black boxes have a purely functional
being; they do not have essences or transcendental cores.

This is why one must invert the logic of Marx’s famous mandate to ‘descend into the hidden abode of production.’ In other words, and to repeat: It is no longer a question of illuminating the black box by decoding it, but rather that of functionalizing the black box by programming it. To be clear, the point is not to ignore the existence of the new black sites of production, from maquiladoras to PC rooms. On the contrary, these black sites are part and parcel of the new industrial infrastructure.

Gazpacho fucked around with this message at 06:47 on May 4, 2015

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Gazpacho posted:

Close your laptop tight and what do you see? A smooth outer opaque shell, hiding and housing a complex electronic machine within. With the lid down, there is little with which to interact. Pick it up, put it down, not much more. Open it again and see the situation reversed: now concave, the external surface of the machine is no longer opaque and smooth, rather it is plastered over with buttons and sockets, speakers and screens, boxes and windows, sliders and menus, clicks and drags, taps and double taps. Splayed open, the box begs to be touched, it exists to be manipulated, to be interfaced.

There are two kinds of black boxes. The first is the cipher and the second is the function. With the lid closed the laptop is a black box cipher. With the lid up, a black box function. The black box cipher is similar to Leibniz’s monad. Like the monad, the cipher ‘has no windows.’ It is a cloaked node with no external connectivity. ‘Function’ black boxes include the computer, the protocol interface, data objects, and code libraries. This new industrial scenario is one in which a great premium is placed on interface, while interiority matters very little, assuming of course that everything is in its place and up and running. These black boxes have a purely functional
being; they do not have essences or transcendental cores.

This is why one must invert the logic of Marx’s famous mandate to ‘descend into the hidden abode of production.’ In other words, and to repeat: It is no longer a question of illuminating the black box by decoding it, but rather that of functionalizing the black box by programming it. To be clear, the point is not to ignore the existence of the new black sites of production, from maquiladoras to PC rooms. On the contrary, these black sites are part and parcel of the new industrial infrastructure.

im gay, too

Dicky B
Mar 23, 2004

Gazpacho posted:

Close your laptop tight and what do you see? A smooth outer opaque shell, hiding and housing a complex electronic machine within. With the lid down, there is little with which to interact. Pick it up, put it down, not much more. Open it again and see the situation reversed: now concave, the external surface of the machine is no longer opaque and smooth, rather it is plastered over with buttons and sockets, speakers and screens, boxes and windows, sliders and menus, clicks and drags, taps and double taps. Splayed open, the box begs to be touched, it exists to be manipulated, to be interfaced.
this is a good description of a computer

Dicky B
Mar 23, 2004

the box excites and entices, beckoning its user towards it with its 14" color display. the smooth, matte exterior of the atx case is dull, yet commanding. i want to gently caress my computer.

fritz
Jul 26, 2003

rrrrrrrrrrrt posted:

i don't know what ontological means and i'm pretty sure i don't wanna

it recapitulates the phylological

Soricidus
Oct 21, 2010
freedom-hating statist shill

fritz posted:

it recapitulates the phylological

so does your mom

Notorious b.s.d.
Jan 25, 2003

by Reene

fritz posted:

it recapitulates the phylological

i had to google this

i am sorry to say it is not a joke and this is an actual possible definition

MononcQc
May 29, 2007

Notorious b.s.d. posted:

i had to google this

i am sorry to say it is not a joke and this is an actual possible definition

I had to google it too and philology was about comparative criticism and study of language in historical sources, and ontology is philosophic stuff about nature of being. Not sure I understand what would be an actual definition compared to a pun about ontogeny vs. philogeny ?

leftist heap
Feb 28, 2013

Fun Shoe
the only people i see using the word "ontological" typically seem not at all worth reading or listening to. like, unhinged academic wannabes like that guy in D&D who won't shut up about his "attention economy" or whatever it is.

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

I had to google it too and philology was about comparative criticism and study of language in historical sources, and ontology is philosophic stuff about nature of being. Not sure I understand what would be an actual definition compared to a pun about ontogeny vs. philogeny ?

the non-joke is that he was using biological definitions not philosophy

https://en.wikipedia.org/wiki/Recapitulation_theory

JewKiller 3000
Nov 28, 2006

by Lowtax

rrrrrrrrrrrt posted:

i don't know what ontological means and i'm pretty sure i don't wanna

in philosophy, an ontology is a systematic account of existence: what kinds of things exist, and how do they relate to each other, in the most general sense

MononcQc
May 29, 2007

Notorious b.s.d. posted:

the non-joke is that he was using biological definitions not philosophy

https://en.wikipedia.org/wiki/Recapitulation_theory

philology vs. philogeny
ontology vs. ontogeny

They're not the same words and don't mean the same thing, right. I thought that was the pun in the first place. But philology isn't to ontology was philogeny is to ontogeny?

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
Convolve your ideas about ontology with the unit toke function and I'll think you'll find that

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