« first day (2358 days earlier)      last day (2592 days later) » 
00:00 - 16:0016:00 - 23:00

4:00 PM
posted on March 31, 2017 by Eric Niebler

TL;DR: In addition to the usual rule about move operations leaving objects in a valid but unspecified state, we can add an additional guideline (not quite a rule, but follow it anyway): Self-move assignment should “work” and leave the object Continue reading Post-Conditions on Self-Move→

 
@Shoe everything that is not REST... try to be more specific
IMO, I wouldn't use HTTP unless I knew my data needs to be exposed over HTTP
 
I need to develop something like a calendar api that is used by desktop and mobile applications and also by a website (using React or the likes).
 
@thecoshman The problem is that if you want to traverse most corporate firewalls and such, HTTP is one of the very few choices that works dependably, whether your data/application really fit the HTTP model or not.
 
@Shoe This is the trouble I have as well - web application, so we're kinda stuck with HTTP unless we wanna start cracking out websockets or something
 
@Puppy Apparently there's a small movement that calls for "pure JSON over WebSockets" as an alternative for REST and the likes
Seems like a less specified GraphQL
 
4:08 PM
@Shoe Did you have something in mind beyond what iCalendar (RFC 5545) provides?
 
@JerryCoffin afaik most corporate firewalls are stupid and just let shit go through port 80 and 443
@Shoe I don't see why rest wouldn't work for this
It's a nice structure
 
@Shoe Seems nearly orthogonal to me. GraphQL is a way of specifying data you want. JSON over WS is a way of transporting data (regardless of how it's specified).
 
@JerryCoffin It's a booking system with fairly complicated logic so I doubt it's in a RFC
@thecoshman I'd pick GraphQL at the moment honestly. It seems easier to query nested data and provides almost the same functionality otherwise.
@JerryCoffin Well, they advocate for simply sending messages in a JSON format. No particular structure.
 
I've not looked into GraphQL
@Shoe where is the 'complexity'? in the requests, or the processing of those requests?
 
@thecoshman Business rules
 
4:11 PM
@Shoe ... erm... the other part of the question
 
@thecoshman Worth a read, IMO. Pretty nicely done.
 
@Shoe still sounds like a REST interface is best route
 
@thecoshman I'm not sure what you mean. It's a server side problem. It's not simply a "allow person X to book in this period".
 
But you've said basically nothing, just that having a web based interface would be good
 
There's meta data about each booking that is relevant to the logic of the calendar
 
4:13 PM
@Shoe The RFC doesn't specify the logic attached--just formats for things like: "I'd like to reserve [some resource] from [start time] to [end time]", or "I'd like to counter-propose [time] for [meeting]."
 
@Shoe so then your interface has nothing to do with it?
 
@thecoshman You mean UI?
 
@Shoe A booking would be a PUT request I would think...
 
Why not a post?
 
it would have data about the booking you want to make
 
4:14 PM
You are creating a new booking
 
@Shoe They book a particular slot, no?
 
Well, no, not directly
 
@Shoe no, the interface that is exposed
@Shoe ah, maybe a POST request then
but still, all the data for what they want to book is in the POST request, server does all it's logic, then returns a result along the lines of either OK or fuck off
 
There are like N parallel calendars and the server decides where to allocate the requested slot depending on how full each calendar is and how often person X is associated with a specific calendar
 
@Shoe so it's fairly simple in terms of the request that is made
 
4:15 PM
Moreover the client can only request a slot, then a staff member have to approve or disapprove such request.
 
¬_¬ I need to get the browser extension again
 
@thecoshman Yeah. I have no issue with designing the API
I'm just looking for the tools that would make it easier
 
just plan it out
think of all the actions users want to do, what things are users going to want to manipulate etc.
 
Most tools seem way too low level.
 
to do what exactly?
 
4:18 PM
Create the server.
Like, do I use Django REST?
Or Servant?
Or other similar tools?
 
I've found Spring Boot in Kotlin to be very easy to get going
@Shoe so you mean frameworks
 
Yeah
 
Yeah, Spring Boot in Kotlin. I've got a wee project in github using it. The rest API side of things is very easy
And Kotlin is a nice language to use
@fredoverflow yay kotlin :D
 
The idea behind postgrest or postgraphql is pretty neat. But it's not too practical because writing advanced logic in psql is not that easy.
But I'd like something like that.
That takes care of authentication/sessions automatically
That just gets the schema and defines its own GET, POST, PUT, routes.
And maybe just give me hooks to each request.
Like here: execute this after fetching the data, or before each request, ...
Maybe I don't know what I want
 
@Shoe If you want to insert more logic outside the database, it's probably easiest to use something like Flask or Crow that lets you hook a URL to a function, and use a normal ORM (or whatever) to talk to the DB. Insert logic as needed before, after or during talking to the DB.
 
4:35 PM
@JerryCoffin Yeah, but that's as low level as it gets. It's not that writing CRUD operations is complicated, it's just that it's boring.
I should suck it up and just start writing code
 
@Shoe So it is--and if that's all you want, postgrest will probably work fine. But if you want to add more logic, everything I know of requires that you do more of the work yourself.
 
5:12 PM
@Shoe The trouble is that you want to simplify everything a lot, to get started quickly and because you don't really know exactly what you'll need
so you can do things "properly" or do them "quickly" (as per usual)
 
Finding good colour palettes for graphs is hard :/
 
@Puppy You are right
 
For some reason, when I try to a colour to my TikZ graph, pdflatex never terminates -_-
 
5:29 PM
Oh dear. TikZ. So many fond memories.
 
At least in one hour I'll be eating Lebanese instead of fighting with infinite loops :v
user image
10
Found @rightfold's GitHub :D
 
So the guest on the new CppCast is a former prof of mine.
 
Ell
@EtiennedeMartel I don't like the intro music to this
IMO they should use something more neutral
 
Ell
xD
wow
I didn't know voices went that deep
 
You've never listened to Dub Incorporation then :p
 
user1804599
@Shoe Firebase
 
6:04 PM
@Morwenn This is so fitting. :D
 
@Borgleader WTF of the day:
-12
Q: How I can do it?

lethanhI'm researching to do same my image. How I can do it ? If you know any library can do it , please tell me know.

 
6:41 PM
@Mysticial wow...
 
7:16 PM
@Borgleader Oh geez... Lisp-style brackets.
 
7:38 PM
   // Fetcher should request config, manifest, and all but 3 resources. For some
   // reason, we are seeing it fetch all but 4 resources. Meh, close enough.
-  EXPECT_EQ(1 + 1 + kNumResources - 4, url_callback_.requested_urls().size());
+  // NOTE(ascheglov): It's actually 3 now. Meh, who gives.
+  EXPECT_EQ(1 + 1 + kNumResources - 3, url_callback_.requested_urls().size());
here we fix tests ^
 
Xeo
7:54 PM
...
fixing tests, not the code, eh...
 
8:40 PM
@Code-Apprentice Hehe, they weren't able to play remixes of traditional North Korean tunes x)
Anyway, that Lebanese restaurant was so good *-*
 
9:00 PM
anybody see the Google Maps for April Fools Day?
 
pretty unimpressive
I hope that's just their lead-in
 
Xeo
9:26 PM
I'm not impressed with the whole April 1st thing anymore. Everybody's expecting it anyways.
 
eh
I'm fine with the expected as long as it's good
I'm merely unimpresesd with the Google Maps one as it was not good
 
hello fellows
 
@jaggedSpire Hey :3
 
hey <3
how're you these days?
 
Pretty fine. What about you? :)
 
9:30 PM
I'm doing pretty great. :)
 
So, what are the news from the overworld?
 
This is the tail-end of a week-long visit with my parents. They invited me to the beach apartment they were renting for the week.
@Morwenn I have absolutely no idea. I was too distracted swimming and interacting with my family. :)
 
@jaggedSpire Hehe, renting beach apartments always soounds weird when you already live b the sea ^^'
@jaggedSpire That's already cool enough :D
 
yep. My parents live about 125 miles from the sea (200 km in real person units) though, and I live in Middle of the Prairie, US, and my brother lives in a state that not only doesn't border water, but also doesn't have a border with any states that themselves border water.
 
not entirely sure how close I am to the sea here, but it's maybe 20km at most
when I visit my parents, I travel 100km and then I am on the other coast, 10km from the sea
 
9:37 PM
@jaggedSpire DOubly landlocked, like Lichtenstein :D
 
@Morwenn yep
hm
I appear to live ~485 km from the nearest large body of water (Lake Michigan)
 
That's indeed pretty far. How do you survive?
 
With river water and rain :P
 
Xeo
and he had such a nice streak going...
 
I stopped following Sequential Art
because it updated so infrequently that I just moved on to other things
 
9:46 PM
heh
 
Xeo
Well, you got a bit to catch up on now
it just finished the Fallout mini-arc
 
 
1 hour later…
10:47 PM
You don't want your cake and eat it, you want to eat it while it bakes it self anew, contuously. And sings the national anthem. You'll have to figure out your required trade-offs; there is no silver bullet. Even if you come up with a datastructure and adapt it to model the required Graph concept(s), it would just shift the inefficiencies to other operations (like insertion or update). — sehe 22 secs ago
 
00:00 - 16:0016:00 - 23:00

« first day (2358 days earlier)      last day (2592 days later) »