beginners

Getting started with Clojure/ClojureScript? Welcome! Also try: https://ask.clojure.org. Check out resources at https://gist.github.com/yogthos/be323be0361c589570a6da4ccc85f58f.
2021-02-14T06:13:42.116500Z

Hi, it's been 3 days now, it's so frustrating to me... please see my videos, i've got the token, and put the token inside the google-creds.edn, and reload it, but why it can't connect? it said 401 Unauthorized https://github.com/SparkFund/google-apps-clj https://youtu.be/7GAcYNR6LFM

😭 1
dpsutton 2021-02-14T08:01:47.117400Z

your client id and client secret are visible in that video. i would strongly suggest taking that video down and doing what needs to be done to revoke access using that client secret

🚒 1
javahippie 2021-02-14T08:12:52.117700Z

It seems like your credentials are not passed on at all. You get a 401 unauthorized, not 403 forbidden

2021-02-14T08:17:36.117900Z

@dpsutton I've delete it, should it still a risk? @javahippie yes, that's what i'm confuse about 😞 I don't know what's wrong with it.

javahippie 2021-02-14T08:18:36.118100Z

You could try to intercept the web request with a proxy, or point the endpoint to your own Ring application and check what arrives there?

dharrigan 2021-02-14T08:45:09.118300Z

I've put together an example

dharrigan 2021-02-14T08:45:15.118500Z

I'll stick it up on github

dharrigan 2021-02-14T09:01:27.118700Z

https://github.com/dharrigan/google-apis-example

dharrigan 2021-02-14T09:01:53.119Z

That works for me. I'm able to list the contents of my folder on google drive. If you can do that, you can do the other operations, like create/edit etc...

dharrigan 2021-02-14T09:01:54.119200Z

.

dharrigan 2021-02-14T09:02:00.119400Z

that should get you started.

dharrigan 2021-02-14T09:02:00.119600Z

.

2021-02-14T16:57:45.128700Z

Hi @dharrigan i've tried your code too... but same result, I'm suspecting : since i had to kill repl (in pink square, i pressed ctrl+c) when prompting to follow the link, because it won't execute next line code. is it the root cause, or else? but even i interrupt it, the token should be still live in 1 hr? it doesn't matter right?

2021-02-14T16:57:59.128900Z

sorry for late reply, i need to cool my head first hahaha

2021-02-14T17:00:30.129100Z

@javahippie sorry i don't know how to intercept?

2021-02-14T06:34:57.116800Z

or it might be because i interrupt the get-auth-map? resulting error. but how not interrupt it? the repl didn't work after i use get-auth-map.

Execution error (InterruptedException) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject/await (AbstractQueuedSynchronizer.java:1627).

william 2021-02-14T12:09:07.122600Z

here's a thing that I, as a beginner to the cljs ecosystem, I'm struggling with: say I send some form to my repl, and I get back:

Execution error (Error) at (<cljs repl>:1).
Unable to resolve spec: :example/spec
Now, (<cljs repl>:1) is a terrible way of signalling the error. There has to be better information available to me, or tricks with which I can get more reliable information on where this problem is. Do you have any suggestion?

Audrius 2021-02-14T12:43:01.123300Z

Hello! How to put a hash-map pretty printed to a string? Just like pprint but to a string

Audrius 2021-02-14T12:44:21.123600Z

what did you sent to the REPL?

2021-02-14T12:54:01.124600Z

(with-out-str (pprint ,,,))

✔️ 1
2021-02-14T12:54:37.125100Z

(`,,,` just means “put the data you want to pprint here”)

william 2021-02-14T14:17:33.125500Z

A command that called a function that was specced with the missing repl

william 2021-02-14T14:17:55.125700Z

I was refactoring the names of my specs at that time, which is why I had the problem

william 2021-02-14T14:27:03.125900Z

the problem in general is that whenever I execute some code from the repl, and that code has problems, I get the suboptimal Execution error (ExceptionInfo) at (<cljs repl>:1)

Audrius 2021-02-14T14:27:49.126100Z

try *e

william 2021-02-14T14:30:13.126300Z

I see thanks! In the example I had this gives a better line number! I'll keep using this

✔️ 1
gibi 2021-02-14T15:52:28.128600Z

Hi, I’m using Cursive in Intellij and I have some unresolved symbols coming from other dependencies. It’s a bit annoying because I would like to jump into the muuntaja code for example, to know how to pass readers to wrap-format (if there is a way). What I’m missing with Cursive settings?

seancorfield 2021-02-14T19:10:54.131100Z

@francesco.losciale If you're not getting Cursive-specific answers here, you can try asking in the #cursive channel.

👍 1
niveauverleih 2021-02-14T20:21:11.133700Z

I just found out that Rhiannon Giddens grew up in Durham, too. The plot thickens.

seancorfield 2021-02-14T20:46:45.133800Z

Do you post this in the wrong channel? It doesn't seem relevant to #beginners?

niveauverleih 2021-02-14T21:17:03.134Z

No. It just seemed that Durham NC seemed to be a place where interesting things happen, besides conj and I wanted to understand why. Sorry for any inconvenience caused.

seancorfield 2021-02-14T21:41:34.134200Z

Possibly a good topic for #off-topic 🙂

ej 2021-02-14T21:50:10.134800Z

I tried to add a cljc file to my project, and now I am getting an exception: http://java.io.FileNotFoundException: Could not locate guestbook/validation__init.class, guestbook/validation.clj or guestbook/validation.cljc on classpath

seancorfield 2021-02-14T21:51:58.135900Z

@endrejoh what was the file you added? where did you add it?

ej 2021-02-14T21:53:15.136900Z

I have three folders with clj, cljs and cljc, like this. The file I added was validation.cljc, which I placed at cljc/guestbook/validation.cljc

ej 2021-02-14T21:53:52.137600Z

In another file called home.clj, I am trying to require the validation file, like this: [guestbook.validation :refer [validate-message]]

seancorfield 2021-02-14T21:54:02.137900Z

And you have that cljc folder on your path for the project? (in project.clj or deps.edn)

ej 2021-02-14T21:54:18.138300Z

Nope, that's it!

seancorfield 2021-02-14T21:54:29.138600Z

(you'll need to restart your REPL after updating your paths)

ej 2021-02-14T21:56:39.139100Z

Thank you, that worked!

ej 2021-02-14T21:57:00.139500Z

A palm to the face, and I try to move on ...

niveauverleih 2021-02-14T22:01:41.139600Z

Yes, or #music

niveauverleih 2021-02-14T22:02:00.139800Z

I didn't no these channels existed.

seancorfield 2021-02-14T22:02:26.140300Z

Hard to keep track when we have hundreds of channels...