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
Workaday Wizard
Oct 23, 2009

by Pragmatica
if you use metaprogramming in any sense other than generic types please explain yourself

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Shinku ABOOKEN posted:

if you use metaprogramming in any sense other than generic types please explain yourself

i live to build beautiful apis

JewKiller 3000
Nov 28, 2006

by Lowtax
your definition of beautiful must be very different from mine

MononcQc
May 29, 2007

I'm okay with logging APIs that use macros and metaprogramming to inject call-site information as context data for log messages for me.

akadajet
Sep 14, 2003

JewKiller 3000 posted:

your definition of beautiful must be very different from mine

no kidding, mr jewkiller

AWWNAW
Dec 30, 2008

metaprogramming is a really cool idea that's almost always terrible in practice but it's a thought exercise and so we must let James do it

AWWNAW
Dec 30, 2008

everyone gets real hung up on this very relative qualifier before "services"

just try not to build lovely services, and if you're incapable of that read some domain driven design books and get a job at thought works or something

Ericadia
Oct 31, 2007

Not A Unicorn

AWWNAW
Dec 30, 2008

FamDav posted:

also event-driven synchronization and post-hoc reconciliation are the 1920s devil and you should probably go somewhere else first for your fix

consistent transactions are the bedrock of any successful large tech company, and its no surprise that google and amazon are built on top of consensus as a service

this is True and Good but you gotta admit AWS gives end users every opportunity (and probably a lot of tutorials) to build systems like this w/o contraindication. what is amazon's chubby?

FamDav
Mar 29, 2008

AWWNAW posted:

this is True and Good but you gotta admit AWS gives end users every opportunity (and probably a lot of tutorials) to build systems like this w/o contraindication. what is amazon's chubby?

amazon's chubby-equivalent is amazon's chubby equivalent. when there's a paper published or a service launched I'll hit you up :3:

and i think at a certain point you have to meet customers where they are and they want to be. i disagree with quite a bit of how some of our customers use our service, but at the same time they're successful and growing on our platform. who am i to judge?

i also don't think event streams themselves are bad, and streams-as-a-service like kafka and kinesis are quite nice and work really well for certain applications. but using them as a common SPOF dumping ground for state is just not a good idea

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i love big beautiful apis

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Shinku ABOOKEN posted:

if you use metaprogramming in any sense other than generic types please explain yourself

I think I wanted to write less code

"don’t repeat yourself", "fewer lines means fewer bugs", etc. taken too far?

the mistaken belief that efficiently making GBS threads out code is of primary importance because I can only type so fast?

I can’t tell what’s more disappointing: that the only reasons I can guess at are bad, or that I don’t remember having a concrete reason for doing it in the first place

maybe my tastes changed

Corla Plankun
May 8, 2007

improve the lives of everyone
the more convoluted your ~event stream~ is, the more it costs to do poo poo in the cloud

it makes perfect sense

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
a train of thought i had at work:

* i notice that a lot of api's in our company have a ton of optional fields
* we have a six-month deprecation notice on api breakage
* instead of wanting to modify their api in a breaking way, people seem to just randomly add new fields then
* this sucks

others have noticed that as well and are proposing we move to kafka and store service's events there. in itself this is fine, but they seem to think this will solve versioning problems as well.

but wouldn't it just be:

* a team starts sending OrderCreated messages to a kafka topic (or stream or whatever it's called, idk)
* they want to change their message
* they either need to create a message-v2 stream, somehow backfill it, and instruct everyone to switch over
* or, they'll just add an optional field to their existing message

seems like they'd choose the latter. it sucks, but it also makes sense that that would be a team's choice, since it's lowest friction for them.

now if it were up to me i'd just make sure you don't need to keep old api's around and part of breaking your own api is that you have to go into other services and fix the integration, which could be fairly straightforward to do. but let's assume this is an organization where that's not possible...how do you handle a scenario like this?

Workaday Wizard
Oct 23, 2009

by Pragmatica
there was a very good post about message versioning by mononcqc iirc but i can't find it

Corla Plankun
May 8, 2007

improve the lives of everyone

Sagacity posted:

* or, they'll just add an optional field to their existing message

we use avro + kafka at work and this is absolutely what everyone does

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
But at some point you reach a tipping point where most of your properties are optional?

gonadic io
Feb 16, 2011

>>=

Sagacity posted:

But at some point you reach a tipping point where most of your properties are optional?

type systems getting you down? just have 100 possible optional fields, only a few of which are populated at any point in time and just make it clear in the documentation which methods populate or require which ones. all of the downsides of strong static typing and none of the upsides!

tef
May 30, 2004

-> some l-system crap ->

MononcQc posted:

my totally flippant opinion of Go and Node.js is that they're the two communities that are the largest proponents of microservices because both language are lacking in terms of facilities to allow the abstractions and code organization required to make a large code base maintainable. The weaknesses in the languages must be palliated by architectural patterns which enforce concepts (i.e. demarcations of programming in the large vs. programming in the small) that are hard to express with the base language itself.

alternatively, monoliths are popular with languages that have high setup costs/deployment costs

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

gonadic io posted:

documentation
ahahahaha

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
seriously though, tooling around api's in general is pretty poor. like, there used to be swagger and raml and perhaps some others. raml got shot and now we just have swagger which is renamed to openapi.

code quality of everything related to swagger is...well -- swagger-codegen is touted as the way to go for generating clients that consume a rest api. it's literally just a Map<String, String> that goes into some kind of mustache (or w/e) template. this is not maintainable at all. their openapi parser has a compatibility mode for 'old style v2 swagger' but it doesn't actually parse it correctly.

and all of this doesn't actually take into account any kind of async api's, so don't expect to provide any documentation about message queues or topics your service may publish

sigh

then there's lots of people in google groups talking about api documentation and tooling, but they're all off in la-la land talking about HATEOAS vs HAL and other hypermedia nonsense nobody cares about

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

quote:

code quality of everything related to swagger is...well -- swagger-codegen is touted as the way to go for generating clients that consume a rest api. it's literally just a Map<String, String> that goes into some kind of mustache (or w/e) template.

if you're on .net you'll have much better luck with NSwag (c#), or SwaggerProvider (f#)

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
thanks, we're doing Java, so I ended up building something using the swagger-parser library and javapoet to generate source code. not too hard to do and it's working fairly well so far.

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?

Shinku ABOOKEN posted:

if you use metaprogramming in any sense other than generic types please explain yourself

metaprogramming in Common Lisp has nothing to do with generic types but it’s both idiomatic and fine, macros are cool and a good way to make it easy to write and read well structured code

it’s just about the only place I’ve seen metaprogramming used non-horribly though

(along with Enterprise Objects Framework, Core Data, and KVC/KVO/bindings, of course)

JewKiller 3000
Nov 28, 2006

by Lowtax

eschaton posted:

macros are cool and a good way to make it easy to write and read well structured code

[citation needed]

AWWNAW
Dec 30, 2008

eschaton posted:

metaprogramming in Common Lisp has nothing to do with generic types but it’s both idiomatic and fine, macros are cool and a good way to make it easy to write and read well structured code

it’s just about the only place I’ve seen metaprogramming used non-horribly though

(along with Enterprise Objects Framework, Core Data, and KVC/KVO/bindings, of course)

yeah lisp macros feel like the right "solution" for metaprogramming... but all the good ones have already been written so we must reinvent them in other languages

spiritual bypass
Feb 19, 2008

Grimey Drawer
frankly learning how to use lisp languages has eliminated my patience for learning any other syntax

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

rt4 posted:

frankly learning how to use lisp languages has eliminated my patience for learning any other syntax

same, except k

redleader
Aug 18, 2005

Engage according to operational parameters

rt4 posted:

frankly learning how to use lisp languages has eliminated my patience for learning any other syntax

same, except javascript

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Shinku ABOOKEN posted:

if you use metaprogramming in any sense other than generic types please explain yourself

i used implicits in scala to create a notequals op for types so that i can make sure that a lambda someone is passing in to a service handler i made isn't just the identity function that returns the service

then again they can just return a tuple with the service handle, so i guess i need to implement something else

Condiv fucked around with this message at 08:43 on Oct 26, 2017

JawnV6
Jul 4, 2004

So hot ...

Condiv posted:

i used implicits in scala to create a notequals op for types
keep reading this as "note quals" so good luck on ur phd

feedmegin
Jul 30, 2008

rt4 posted:

frankly learning how to use lisp languages has eliminated my patience for learning any other syntax

same, except malbolge

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Akifumi Takata posted:

Dear all,

Nursery is a persistent object framework (object database) for Cocoa.
It is written in Objective-C.
It is implemented ONLY with the Cocoa Framework.

Akifumi Takata posted:

Dear all,

I changed the problematic domain name to nursery-framework.org.
Along with that, I also changed the program's Bundle Identifier etc.

Akifumi Takata posted:

Dear Richard Charles,

I let you feel uncomfortable.

I'm sorry.

I already understood the word in English-speaking countries and how it is understood by people.

In the check-in comment "pedophiliaという名称をnursery-frameworkに変更した。" means "Changed the name pedophilia to nursery-framework" in English.
In addition, "ファイル中の不適切な名称を変更。" means "Change inappropriate name in file" in English.

Akifumi Takata posted:

Dear Alex Zavatone,

I would like to explain a bit more about this.

As a premise, in Nursery the word "object" has two major meanings.

One is an object that is represented by the Objective-C runtime and exists in memory.

The other is an object that is represented by Nursery and exists in a serialized form in the database file.

The lifetime of these two kinds of objects is not the same.

The above-mentioned word GC deals with objects of the second meaning.
Therefore, it can not cope with ARC or the traditional method of retain / release.

This process is implemented by NUKidnapper.
Then, the area in the database file freed by GC is compactioned by NUParader.

I am anxious about the class name now.

Akifumi Takata posted:

code:
//
//  NUKidnapper.h
//  Nursery
//
//  Created by P,T,A on 11/08/17.
//  Copyright 2011 Nursery-Framework. All rights reserved.
//

#import <Nursery/NUTypes.h>
#import "NUThreadedChildminder.h"

extern const NUUInt8 NUKidnapperNonePhase;
extern const NUUInt8 NUKidnapperStalkPhase;
extern const NUUInt8 NUKidnapperKidnapPhase;

@class NUIndexArray, NUMainBranchNursery, NUPeephole;

@interface NUKidnapper : NUThreadedChildminder
{
	NUIndexArray *grayOOPs;
	BOOL shouldLoadGrayOOPs;
	NUUInt8 currentPhase;
	NUUInt64 grade;
	NUPeephole *peephole;
}

+ (id)kidnapperWithPlayLot:(NUPlayLot *)aPlayLot;

- (id)initWithPlayLot:(NUPlayLot *)aPlayLot;

- (void)objectDidEncode:(NUUInt64)anOOP;

- (void)save;
- (void)load;

- (NUMainBranchNursery *)nursery;

- (NUUInt64)grade;

@end

@interface NUKidnapper (Private)

- (void)stalkObjects;
- (void)stalkObjectsUntilStop;
- (void)kidnapObjects;
- (void)pushRootOOP;
- (void)loadGrayOOPs;
- (void)pushOOPAsGrayIfWhite:(NUUInt64)anOOP;
- (void)pushOOPAsGrayIfBlack:(NUUInt64)anOOP;
- (NUUInt64)popGrayOOP;
- (void)setGrade:(NUUInt64)aGrade;

@end

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
holy gently caress. his bug reporting email is report@pedophilia.jp

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
https://github.com/Nursery-Framework/Nursery/blob/master/Nursery/NUGradeKidnapper.h

christ how do you get this unlucky. this is like tobias funke levels of bad naming

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
like, the project name i can maybe get, it's compositional, most -philia/-phile words are positive, maybe you saw it and never thought to check

the kidnapper thing is just, how, is this all some bizarre troll, did you really write an entire object database from scratch just to do this. like the analogies all actually work, grades and sandlots and kidnapping and :wtf:

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

rjmccall posted:

like, the project name i can maybe get, it's compositional, most -philia/-phile words are positive, maybe you saw it and never thought to check

the kidnapper thing is just, how, is this all some bizarre troll, did you really write an entire object database from scratch just to do this. like the analogies all actually work, grades and sandlots and kidnapping and :wtf:

the next time he emails one of you just respond with "moe" and see what reaction that elicits

Xarn
Jun 26, 2015

:drat:

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


rjmccall posted:

like, the project name i can maybe get, it's compositional, most -philia/-phile words are positive, maybe you saw it and never thought to check

the kidnapper thing is just, how, is this all some bizarre troll, did you really write an entire object database from scratch just to do this. like the analogies all actually work, grades and sandlots and kidnapping and :wtf:

what about peepholes? why was this file created by PTA? why are there stalking functions? :stonk:

Adbot
ADBOT LOVES YOU

Truga
May 4, 2014
Lipstick Apathy

this owns so much

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