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
Abandon
Nov 23, 2006
:synpa:

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

http://resthooks.org/

because polling socks, let's reimplement everything TCP or TLS, but over HTTP over TCP/TLS, and with an ad-hoc description rather than an actual spec.

The docs includes use cases for:

  • congestion control
  • retransmissions of lost messages
  • in-order delivery guarantees
  • authentication and handshakes

They even acknowledge the existence of things like websockets that could be better and lighter (given they're just a way to tunnel TCP-equivalent poo poo but over HTTP), but declare that (instead of writing a websocket->rest proxy, or whatever else) it's just better to have all these entire patterns to do poo poo and reimplement it all over again because CRUD.

:smithicide:

Opinion Haver
Apr 9, 2007

quote:

Over a representative time period, Zapier polled for changes 30 million times but only took action on 460,000 of those polls (1.5% efficient).

Contrast this with REST Hooks, where 547,000 hooks were received over the same period and all of them were acted upon (100% efficient).

In other words, if everyone implemented REST Hooks, server load for both the sender and receiver could be reduced by 66x.

lol

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

MononcQc posted:

http://resthooks.org/

because polling socks, let's reimplement everything TCP or TLS, but over HTTP over TCP/TLS, and with an ad-hoc description rather than an actual spec.

The docs includes use cases for:

  • congestion control
  • retransmissions of lost messages
  • in-order delivery guarantees
  • authentication and handshakes

They even acknowledge the existence of things like websockets that could be better and lighter (given they're just a way to tunnel TCP-equivalent poo poo but over HTTP), but declare that (instead of writing a websocket->rest proxy, or whatever else) it's just better to have all these entire patterns to do poo poo and reimplement it all over again because CRUD.

:smithicide:

looks like it's just a brand name and a smug web page about something zillions of services already do

fitbit, withings, etc. have had subscriptions for years at this point

uG
Apr 23, 2003

by Ralp
what if i wish to use the superior SOAP

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
SOAP isn't web scale!!

Nomnom Cookie
Aug 30, 2009



has anyone ever used soap over a non http transport

Shaggar
Apr 26, 2006
I don't think so

Nomnom Cookie
Aug 30, 2009



soap was created to make corba look good

Shaggar
Apr 26, 2006
soap is fine.

Shaggar
Apr 26, 2006
its just a bummer theres no replacement or new work being done on messaging standards.

MrMoo
Sep 14, 2000

Nomnom Cookie posted:

has anyone ever used soap over a non http transport

I think Microsoft use it over MSMQ for some of their other terrible software. I've certainly seen SOAP on MSMQ on PGM.

Bloody
Mar 3, 2013

i used soap once to serialize a .net application's settings to disk

Nomnom Cookie
Aug 30, 2009



work uses mysql as a message queue

Shaggar
Apr 26, 2006
lots of message systems use volatile storage

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

work uses mysql as a message queue

i used to work on bunch of in-house software that used mysql for all ipc

but data was passed to/from customers using ibm mq and xcbl and soap

the original devs just couldn't make the conceptual leap to use that poo poo internally i guess

Notorious b.s.d.
Jan 25, 2003

by Reene
oh i forgot the best part

it was mysql 4, so there was no meaningful way to lock rows or anything. jobs just had to be very precisely scheduled not to step on each other's toes. with a homebrew job scheduler. can't make this up


who needs transactions
data integrity is for enterprise-y firms

Workaday Wizard
Oct 23, 2009

by Pragmatica
Hiya cpphiles

I have a question regarding cpp pointer-to-members.


Why?

shrughes
Oct 11, 2008

(call/cc call/cc)
For member functions, the reason why is pretty obvious.

For member fields, to be consistent with member functions.

Zlodo
Nov 25, 2006
pointer to members are v useful to do things like serialization, scripting language bindings, using methods as callbacks for listeners and such

Workaday Wizard
Oct 23, 2009

by Pragmatica
Thanks for the answers. I haven't thought of those applications :blush:

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shinku ABOOKEN posted:

Thanks for the answers. I haven't thought of those applications :blush:

this thread is frequently a place where you wind up saying "oh, i hadn't thought of that" :shobon:

qntm
Jun 17, 2009

Nomnom Cookie posted:

has anyone ever used soap over a non http transport

over JMS, yup :shepface:

Nomnom Cookie
Aug 30, 2009



std::bind is really cool and i wish java wish java had anything like it

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

std::bind is really cool and i wish java wish java had anything like it

java 8 includes lambdas to make this not painful
(you could hack around it now but the syntax would be so nasty it wouldn't be worth it)

edit: it just dawned on me that the hacky way to do this in java today is basically what std::bind does -- abuse generics with a special class that exists only to compose functions

Nomnom Cookie
Aug 30, 2009



i doubt that java generics would let you do java.lang.PartiallyAppliedFunctionFactory

Max Facetime
Apr 18, 2009

Nomnom Cookie posted:

work uses mysql as a message queue

Shaggar posted:

lots of message systems use volatile storage

:laugh:


Nomnom Cookie posted:

i doubt that java generics would let you do java.lang.PartiallyAppliedFunctionFactory

java generics won't, but MethodHandles should, with the caveat that the code is really ugly

this short demonstration calls Throwable.printStackTrace from another thread the traditional way and by adapting a MethodHandle:

Java code:
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandleProxies;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;

public class Snippet {
  private static Runnable version1(final Throwable throwable) {
    return new Runnable() {
      @Override public void run() {
        throwable.printStackTrace();
      }
    };
  }

  private static Runnable version2(Throwable throwable)
      throws NoSuchMethodException,
      IllegalAccessException {

    MethodHandle printStackTrace = findMethodThrowablePrintStackTrace();

    MethodHandle noArgPrintStackTrace =
      MethodHandles.insertArguments(printStackTrace, 0, throwable);

    return MethodHandleProxies.asInterfaceInstance(
      Runnable.class,
      noArgPrintStackTrace);
  }

  private static MethodHandle findMethodThrowablePrintStackTrace()
      throws NoSuchMethodException,
      IllegalAccessException {

    MethodType printStackTraceSignature =
      MethodType.methodType(void.class);

    return MethodHandles.lookup().findVirtual(
      Throwable.class,
      "printStackTrace",
      printStackTraceSignature);
  }

  public static void main(String[] args) {
    try {
      Thread thread1 = new Thread(version1(new Exception()));
      thread1.start();
      thread1.join();
      Thread thread2 = new Thread(version2(new Exception()));
      thread2.start();
      thread2.join();
    } catch(InterruptedException | NoSuchMethodException
      | IllegalAccessException e) {
      e.printStackTrace();
    }
  }
}

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

i doubt that java generics would let you do java.lang.PartiallyAppliedFunctionFactory

uhhh something like that

trigger warning: this is worse than c++

http://www.drdobbs.com/jvm/functional-programming-in-java/184406320

Notorious b.s.d.
Jan 25, 2003

by Reene
Partial.java is too big to paste w/ comments so here's a github gist

it's really, really ugly. with lambdas this entire file would be like five lines. using generics, it's a clusterfuck

https://gist.github.com/anonymous/6543643

here is a sample

Java code:
	/**
	 * Makes a partial function object with 4 arguments remaining.
	 * @param <T0>		is the type of the previous function argument
	 * @param <T1>		is the type of the next function argument
	 * @param <T2>		is the type of the second remaining function
	 * 					argument
	 * @param <T3>		is the type of the third remaining function
	 * 					argument
	 * @param <T4>		is the type of the final function argument
	 * @param <R>		is the return type of the function object
	 * @param <A>		is the type of the current ArgList
	 * @param <E>		is the type of the Executioner
	 * @param arglist	is the current ArgList
	 * @param execute	is the executioner
	 * @param f			is the current function object,
	 * 					used to infer types needed by this function
	 * @return			the function object with 4 arguments remaining
	 */
	public static
	<T0, T1, T2, T3, T4, R, A, E extends
		Executioner<R, ArgList<T4, ArgList<T3, ArgList<T2, ArgList<T1, A>>>>>>
//	Fcn<T1, Fcn<T2, Fcn<T3, Fcn<T4, R>>>>
	Function.O4<T1, T2, T3, T4, R>
	make4(A arglist, E execute,
			Fcn<T0, Fcn<T1, Fcn<T2, Fcn<T3, Fcn<T4, R>>>>> f) {
		return new O4<T1, T2, T3, T4, R, A, E>(arglist, execute);
	}

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal
:barf:

Shaggar
Apr 26, 2006
abusing generics is always ugly

Soricidus
Oct 21, 2010
freedom-hating statist shill
someone somewhere is using that in production code

Zlodo
Nov 25, 2006

Notorious b.s.d. posted:

trigger warning: this is worse than c++

well duh

Opinion Haver
Apr 9, 2007

i think i found tbc's g+ account

quote:

Types were invented by compiler writers to make their job easier. They do not make programming easier.

quote:

I program a lot in Perl. It has only one simple type, scalar. You can stick anything in it, a number, text, or a reference.

quote:

For every programmer I worked with, every time they had a problem with types was in a strongly-type language.

gonadic io
Feb 16, 2011

>>=
natural programming just got strongly typed!

code:
Feature: The Data.List module

    In order to be able to use lists
    As a programmer
    I want a module that defines list functions

    Scenario: Defining the function foldl
      Given I want do define foldl
      Which has the type (in brackets) a to b to a (end of brackets),
                         to a, to list of b, to a
      And my arguments are called f, acc, and l
      When l is empty
      Then the result better be acc
      Otherwise l is x cons xs
      Then the result should be foldl f (in brackets) f acc x
                                (end of brackets) xs

gonadic io fucked around with this message at 23:39 on Sep 12, 2013

Nomnom Cookie
Aug 30, 2009



a compelling alternative to cucumber

uG
Apr 23, 2003

by Ralp

quote:

I program a lot in Perl. It has only one simple type, scalar. You can stick anything in it, a number, text, or a reference.

Perl has three built-in data types: scalars, arrays of scalars, and associative arrays of scalars :goonsay:

Nomnom Cookie
Aug 30, 2009



uG posted:

Perl has three built-in data types: hash, weed, and pound sign
:goonsay:

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

uG posted:

hash weed and pound

friday night motherfuckers

Adbot
ADBOT LOVES YOU

NOTinuyasha
Oct 17, 2006

 
The Great Twist
protobuf: if i add values to an existing enum will it break the protocol or will old versions just set the enum to default if an unknown value is encountered?

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