Fork me on GitHub
#off-topic
<
2021-02-08
>
theVastSilence00:02:47

I would not buy an Apple either. The M1 CPU sounds awesome but their OS has become too much of a walled garden.

☝️ 9
seancorfield00:02:08

I don't any of us would have expected Microsoft to become so much more open and supportive of OSS while Apple became more and more hostile to developers... I remember when Microsoft turned up at one of the MongoDB conferences and everyone was like "wut?" and they gave a keynote talk about all their OSS work and how supportive they were about MongoDB and Azure...

p-himik09:02:51

Although I'm still cautious and can't really see myself using their products that aren't fully OSS in a serious way any time soon with their EEE approach that can still be seen today.

mauricio.szabo14:02:28

I still don't believe in Microsoft. There are still LOTS of red flags with their policies, deliberate misleading content, and other issues...

emilaasa07:02:06

I'm going for a workstation this time around. Right now my biggest problem is graphics card availability / price.

delaguardo11:02:14

)) coincidentally in my toy language that mimics excel LAMBDA already available as FN with the same syntax ) oh… and LET is available as WITH (syntax is the same as well), cool

Idan Melamed15:02:06

Hello, @eval2020 and I are looking for 2 more people to mob program with, so we can work together on our programming skills. Clojure, functional programming, data oriented programming, refactoring, test driven development, etc. The method: Weekly session of remote mob programming. We might call it gang programming. Sounds more bad-ass, being part of a gang. Also, there will be 4 of us, so it’s kind of like the gang of 4, isn’t it? When: Tuesday, 12:00 UTC. PM me if you are interested.

Stuart18:02:11

Web people. I want to GET information from a web server. SO I'm thinking I want a GET, but I need to send data that will determine what information comes back. A little 3 property json object

{
   "ropeId": 25,
   "firstSegment": 1000,
   "lastSegment": 1350
}
I've been told this needs to be a POST. But my understanding of POST is you use this when sending data to the API that will result in something on the server changing, e.g. adding record to db. Using a POST to retrieve data feels wrong. Ive been told I can't send body in a GET from a JS ajax request. Is this normal? If you need to send data with a GET, you use a POST? Ive written my API as a GET, with a FromBody attribute (C#) and I can send data to it via postman by putting hte body in RAW format and pasting in my json. So is Postman doing something funky to trick my API?

noisesmith20:02:30

you cannot send a body with GET, the "normal" thing is that the URI is structured to include the information that your object carries (as path and/or query params)

Stuart20:02:45

Yeah, I've changed it to put the params in teh URL. So what was Postman doing somethign funky then? My web method was marked [HttpGet]

noisesmith20:02:52

hmm, I was wrong - a GET can contain a body, but the spec says the body can't be meaningful

Stuart18:02:57

And relaly I should change my WEB API web method to be a POST.

coby18:02:34

Is there a reason you don't want to just send these vars in a query string? So ?ropeId=25&firstSegment=1000&lastSegment=1350

Stuart18:02:50

in this case since their is only 3, I think I will do that

Stuart18:02:01

but what would you do if say I had 10 ? And the URI gets a bit cumbersome?

Stuart18:02:38

or had a complex object

coby18:02:48

Cumbersome in what way? You can express arbitrary nesting in a query string with square brackets:

?parent[daughter]=A&parent[son]=B&grandparent[child][grandchild]=xyz

Stuart18:02:31

oh, i wasn't aware of that!

coby18:02:52

for sure!

coby18:02:24

also flat arrays with [] e.g. x[]=1&x[]=2

coby18:02:49

There are times when it might be reasonable to require a POST, e.g. for consistency with endpoints in a larger API. But you should weigh it carefully against benefits of GET, like being able to leverage caching and share URLs easily.

noisesmith20:02:28

are the nestings with [] part of the HTTP spec, or a convention that's widely used?

hiredman21:02:45

Convention, the spec allows you to repeat any names, so really all query parameters should be multivalued, but to make it easy most libraries treat them as single values, which then caused people to go back and invent this new marker for parameters they want to be multivalue

noisesmith21:02:59

it seems like grandparent[child][grandchild]=xyz would be simpler as grandparent.child.grandchild=xyz

hiredman21:02:49

it would be simpler as a request body

noisesmith21:02:48

the initial question was about GET, and the content of a GET body isn't supposed to influence the result (if I understand correctly)

noisesmith21:02:17

and switching to POST just so you can use a request body for parameters also seems less than ideal

hiredman21:02:21

it seems complicated