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.
 
  • Locked thread
Corla Plankun
May 8, 2007

improve the lives of everyone
i think you're supposed to mute faces that get too close to the camera

Adbot
ADBOT LOVES YOU

MrMoo
Sep 14, 2000

Mr Dog posted:

I have a question about paging results sets returned by a REST server.

The OData model uses a snapshot to send paginated results to the client, there is a standard mechanism to request paging and to request change notification, or both. When requesting both pagination and change tracking one must walk the entire result set before proceeding to the next change set.

Kinda interesting but clunky implementation, used on OneDrive and many others.

tef
May 30, 2004

-> some l-system crap ->

Notorious b.s.d. posted:

python, perl, and ruby are all reasonable choices for this sort of task. they're scripting languages, fiddling with unix poo poo in a hurry is what they're meant for. just use whichever one you like the most.

just don't write any more shell scripts

it's 2016, there is enough horror in the world without a new file ending in '.sh'

pick perl if you have very little control over what is installed on the machines. perl is everywere and tbh for small scripts works very well. it's designed for unix janitoring

it's weird around the edges, and yeah, some people still write perl 1 to 4 in 5, but that kinda died out. the camel book is well written.

don't pick perl if you have to run poo poo on windows

if you have to make things work on windows, use python

python has a bunch of poo poo built in and it kinda does the job ok, but uh subprocess is full of mystery so maybe a wrapped unix janitoring library would help

but ruby, well, honestly i'd advise against doing janitory scripts in ruby. the built ins are painful, and uh, the environment and tools are a little fast moving.

i'd only use ruby for janitoring scripts if i could rely on something else to ensure ruby was there and up to date

but uh, in the end if you're janitoring remote machines and not local machines, or ones where you're deploying things

you're gonna end up writing bash

either in a subset of bash, run under shell check, and in a perfect world it would commented as if it were assembly language

or an ad-hoc yaml templating system that concatenates a bunch of strings together and runs bash scripts behind the scenes

tef
May 30, 2004

-> some l-system crap ->
like the whole "statelessness" thing is that "the protocol should not be stateful", or if you like, the messages sent over http can be re-ordered or sent across different links

the point of this is that middleware does not have to do stateful tracking to provide useful services: it can add compression to output, resend GET requests, re-direct things

cinci zoo sniper
Mar 15, 2013




Corla Plankun posted:

i think you're supposed to mute faces that get too close to the camera
im not sure if it's just faces if i my assumption of the viewpoint there is correct - i see the coordinates, but idk the scale

tef
May 30, 2004

-> some l-system crap ->
maybe

your "pagination requests should be idempotent in the face of concurrent updates" is close to "i should be able to re-order my requests and get the same responses" and maybe "instead of sessions on the server and nothing on the client, the client should store some session data and pass it through" and maybe "each request carries it's own context, rather than sharing it with other requests i've made" and then "this request context is the state of the world when I made the request" to "the client stores the state, and transfers a representation of it to the server when making a request"

rest says poo poo all about snapshot isolation, beyond "it's your problem to deal with but you should not bake session contexts into the messaging protocol"

Bloody
Mar 3, 2013

hobbesmaster posted:

not paying a king's ransom to mathworks is though

matlab is also a thin wrapper over these same base libraries

tef
May 30, 2004

-> some l-system crap ->
rest: the ideas around having load balancers, caches, cgi-bin, links, forms are neat ways of building large interoperable systems at scale. heck, imagine if html was annotated so that it was so easy to screen-scrape/automate.

restful: here is a list of urls and the json files they accept and return. if we ever need to return a new thing or change where something is you will
have to update your list of urls. the following string values are special string values. please pray to god that the ints never go across 53 bits, amen

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Corla Plankun posted:

i think you're supposed to mute faces that get too close to the camera

we can be at (5,0,0) with the cube at (0,0,0) and we'll still see garbage


kalstrams posted:

im not sure if it's just faces if i my assumption of the viewpoint there is correct - i see the coordinates, but idk the scale

it's just units. the cube is (1,1,1) units big.

Bloody
Mar 3, 2013

c# is a good windows janitorial language although powershell is probably better

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Bloody posted:

c# is a good windows janitorial language although powershell is probably better

have fun picking from the 3 or 4 different ways to download a loving file depending on the version of powershell and .net frameworks installed! if you want something thats backwards compatible forever i hope you like powershell 2, fucko!!!

Bloody
Mar 3, 2013

idk I've never used powershell

Bloody
Mar 3, 2013

win7 ships with net 4.0 iirc but should have 4.5 installed and either way both are pretty well featured

Sapozhnik
Jan 2, 2005

Nap Ghost
my thought process was something like "what if i do snapshot isolation except not really". you can't keep a transaction open for an extended period of time so you have to fake it up somehow and make some compromises along the way.

if i can return all the rows at least once but some of them might change in the course of the iteration then i can live with that. i can probably do that if i don't give the client the ability to sort the data server-side but instead order the rows by creation timestamp, pass the last row id in a url state parameter, and use soft deletes so i can still pick up where i left off even if the anchor row gets deleted.

or maybe do the opposite: let the client sort stuff but then not paginate and require the client to do "pagination" by constraining the result set using things it knows already.

but you can't do both without full historical snapshots of every row which is just a pain in the dick and not something that sql databases are good at to begin with.

FamDav
Mar 29, 2008
however you choose to represent your pagination token, make sure you at least obfuscate it and probably encrypt it.

otherwise you will end up with customers who are dependent on your tokenization scheme and they will get angry when you want to change it.

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

my thought process was something like "what if i do snapshot isolation except not really". you can't keep a transaction open for an extended period of time so you have to fake it up somehow and make some compromises along the way.

or use a cursor and live with it

you will need more of a machine to handle the historical data being live

triple sulk
Sep 17, 2014



Bloody posted:

c# is good

JewKiller 3000
Nov 28, 2006

by Lowtax
window functions are great, dehumanize yourself

Sapozhnik
Jan 2, 2005

Nap Ghost

JewKiller 3000 posted:

window functions are great, dehumanize yourself

For batch process reporting, sure. For use from an ORM? Every single one I know of be all "lol gently caress this poo poo i'm out"

Notorious b.s.d.
Jan 25, 2003

by Reene

Mr Dog posted:

For batch process reporting, sure. For use from an ORM? Every single one I know of be all "lol gently caress this poo poo i'm out"

blame mysql

hibernate will happily provide a lot of SQL-isms via the horrid "HQL" poo poo, but not window functions, because window functions don't cleanly map to all backends. and we all know which backend is the problem.

hobbesmaster
Jan 28, 2008

JewKiller 3000 posted:

window functions are great, dehumanize yourself

whats your favorite raised cosine window? i like hanning windows myself

Breakfast All Day
Oct 21, 2004

my favorite window function is seeing the beauty of nature that i never interact with because i chose to work with computers

JewKiller 3000
Nov 28, 2006

by Lowtax
mine is looking out the window and seeing how great the weather is outside and thinking to myself "hey maybe i should leave the office and go for a nice half hour walk without telling anyone" then do exactly that because i work with computers and nobody fucks with me over such trivialities

then i go back inside to the comfortable air conditioning, think for a while, and press some buttons on my luxurious mechanical keyboard. for these actions i am paid more than is reasonable for a single human

Progressive JPEG
Feb 19, 2003

Mr Dog posted:

but you can't do both without full historical snapshots of every row which is just a pain in the dick and not something that sql databases are good at to begin with.

just send each client a full dump of the dB and implement all filtering sorting and pagination on the client :clint:

cinci zoo sniper
Mar 15, 2013




Progressive JPEG posted:

just send each client a full dump of the dB and implement all filtering sorting and pagination on the client :clint:
i imagine client will appreciate control over the data, but it's probably better to e-mail sql queries over and set automated parsing on the other end, so you are sure it does what it should

Progressive JPEG
Feb 19, 2003

the emails will also provide for easy auditing

Sapozhnik
Jan 2, 2005

Nap Ghost

Breakfast All Day posted:

my favorite window function is seeing the beauty of nature that i never interact with because i chose to work with computers

Notorious b.s.d.
Jan 25, 2003

by Reene

JewKiller 3000 posted:

then i go back inside to the comfortable air conditioning, think for a while, and press some buttons on my luxurious mechanical keyboard. for these actions i am paid more than is reasonable for a single human

thug lyfe

Sapozhnik
Jan 2, 2005

Nap Ghost
one day i will learn to stop hanging myself with stupid estimates for poo poo

(this whole rest api thing isn't even work related, more of a thought experiment).

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
re: windowing

just use temporal tables for everything :getin:

30 TO 50 FERAL HOG
Mar 2, 2005



so i bought an old amplifier that has multi input and multi zone output and can be controlled over rs232

im thinking about making an app that i can use to control it but im not quite sure which route i should go

i could use a native app on my phone and communicate with a windows program that actually sends the commands over serial. planning on using c# and maybe webapi

the other option is to have a completely phone independent, just have a web application (again in c#) that ill visit on my devices

any opinions on how a terrible programmer should do this

EVGA Longoria
Dec 25, 2005

Let's go exploring!

build the webapi

then you can build a page or an app to control it, or both

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

hobbesmaster posted:

whats your favorite raised cosine window? i like hanning windows myself

always bet on blackman

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
I"m tired and don't want to be at work today.

My productivity is low and plummeting by the minute.

Over the weekend I actually wrote some python code for a side project I don't even know why. Turns out I still hate dynamic typing.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Finster Dexter posted:

I"m tired and don't want to be at work today.

My productivity is low and plummeting by the minute.

i was woken up yesterday about 90 minutes too early by a smoke alarm. the battery was low, but instead of just a beep once a minute, it decided to go full blast.

kind of didn't feel like sleeping after that, but i was super tired at work. i got practically no work done.

NihilCredo
Jun 6, 2011

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

talking about pair programming on slack

dk posted:

I have a colleague who really likes regions, his editor font of choice is comic sans, and instead of tooltips he likes using peek definition

oh, and his font size is like 16

HoboMan
Nov 4, 2010

babby's first IDE customization

e: holy gently caress wait comic sans isn't monospaced right? lmbo

HoboMan fucked around with this message at 17:08 on Jul 5, 2016

cinci zoo sniper
Mar 15, 2013




HoboMan posted:

babby's first IDE customization

e: holy gently caress wait comic sans isn't monospaced right? lmbo
yeah but dont worry, https://github.com/belluzj/fantasque-sans

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

HoboMan posted:

babby's first IDE customization

e: holy gently caress wait comic sans isn't monospaced right? lmbo

actually, proportional fonts are good

not comic sans obv, but in general the reason people use monospaced fonts for writing code is 100% just inertia

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

Finster Dexter posted:

I"m tired and don't want to be at work today.

My productivity is low and plummeting by the minute.

same

I stayed up late to care for sick cat.
I woke up early to care for sick cat.
I then had to kick the poo poo out of some other cat that was trying to step, sensing weakness.
I just stayed up after that.

Hope I didn't just get rabies!

  • Locked thread