off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
theVastSilence 2021-02-08T00:00:47.160200Z

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

☝️ 3
seancorfield 2021-02-08T00:13:08.162100Z

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-himik 2021-02-08T09:18:51.164900Z

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.szabo 2021-02-09T14:04:28.199700Z

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

chucklehead 2021-02-08T00:59:45.163Z

I've been using a Surface Pro X (Win10/aarch64) for a while, so I hear your JavaFX pain. One thing I've used to work around it is https://github.com/djblue/portal if you haven't tried it yet. In my case portal is usually running in a JVM process in WSL2 and I connect to its localhost port manually from a native Windows browser or vscode webview.

emilaasa 2021-02-08T07:08:06.164500Z

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

Chris McCormick 2021-02-08T11:23:56.166100Z

https://twitter.com/msexcel/status/1356965673784795143

2021-02-08T11:29:14.168500Z

)) 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

papachan 2021-02-08T13:52:31.169Z

Idan Melamed 2021-02-08T15:10:06.169500Z

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.

2021-02-08T18:34:11.174700Z

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?

2021-02-08T18:34:57.175Z

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

coby 2021-02-08T18:37:34.176300Z

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

2021-02-08T18:37:50.176700Z

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

2021-02-08T18:38:01.177100Z

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

2021-02-08T18:38:38.177300Z

or had a complex object

coby 2021-02-08T18:43:48.179700Z

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

2021-02-08T18:44:31.179900Z

oh, i wasn't aware of that!

2021-02-08T18:44:32.180100Z

thanks

coby 2021-02-08T18:44:52.180300Z

for sure!

coby 2021-02-08T18:47:24.181100Z

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

coby 2021-02-08T18:51:49.183Z

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.

2021-02-08T20:53:30.183100Z

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)

2021-02-08T20:55:28.183800Z

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

2021-02-08T20:55:45.183900Z

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]

2021-02-08T20:57:52.184100Z

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

2021-02-08T20:57:53.184300Z

weird

2021-02-08T21:06:45.189500Z

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

2021-02-08T21:07:59.190400Z

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

2021-02-08T21:09:49.191Z

it would be simpler as a request body

2021-02-08T21:10:48.191700Z

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

2021-02-08T21:11:17.192400Z

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

2021-02-08T21:11:21.192500Z

it seems complicated

2021-02-08T21:12:02.193Z

https://stackoverflow.com/questions/978061/http-get-with-request-body/983458#983458 you can see the UPDATE at the end