Fork me on GitHub
#beginners
<
2019-04-09
>
noisesmith00:04:26

yeah, the expansion @hiredman showed of let would do the map construction I was mentioning

johnj00:04:42

neat, need to stop postponing the macro chapter 😉

Sagar06:04:23

hi all how to get the current url from address bar in clojure for ex "http://www.eaxmple.com/73-catregory" is the current url , then how to get this using clojure

Lennart Buit06:04:27

sorry you will have to be a bit more specific, for example which web server library you are using

Sagar06:04:24

we are using Ring Lib and i want current url from address bar please help

valerauko06:04:22

Such info usually resides in the request map (or equivalent construct)

Nazral06:04:48

Is there a way to get all the positions of a regex match in a string with clojure?

Nazral06:04:22

thank you! I think I'll just proceed differently, the patterns are rather simple I should be able to do it without going to java

Lennart Buit06:04:52

well if you are using clj, there is interop with Java

Lennart Buit06:04:43

on cljs you are probably out of luck 😛

Nazral07:04:59

I am using clj, but precisely, I'd rather avoid java

Lennart Buit06:04:17

(hope that helps!)

borkdude08:04:22

If you’re just learning #clojure or spec, but also want to do something useful for other community members, contribute a missing spec to re-find.web: https://re-find.it/ It’s easy and fun.

parrot 4
Sasho09:04:44

Wow, that’s really nice!

Robert Nikander09:04:44

So if I instrument a function with spec, it checks the :args. Anyone know if they are planning to add an option to also check the :ret and :fn parts of the spec?

Alex Miller (Clojure team)12:04:50

There may be some changes around this in spec 2, still discussing

jaihindhreddy09:04:44

Probably not (I don't know either). Instrumenting is only about checking if you are calling you're function correctly. Whether it returns the right thing is a different concern that generative testing helps with. There are libraries that provide this though (Orchestra if I remember the name correctly)

Robert Nikander09:04:16

Okay, I see the Clojure JIRA where the idea was declined, at least for now. I'll try orchestra. I feel like this is more useful in UI/cljs code, where unit testing is harder.

Lennart Buit10:04:39

I noticed that it is a bit of a performance hit

Lennart Buit10:04:01

so that is something to look out for

tabidots11:04:57

@dpsutton @hiredman Thanks for your help with the polynomial stuff last week. Hash-maps were definitely the way to go! Managed to implement the extent of my knowledge about polynomials. https://github.com/tabidots/numthy/blob/master/src/numthy/polynomial.clj

👏 4
clojurites_1911:04:40

How to add days in current date using clj-time library ?

jaihindhreddy12:04:27

(t/plus (t/now) (t/days 2))?

jaihindhreddy12:04:02

@shraddha.paktolus BTW here's my require (require '[clj-time.core :as t])

jaihindhreddy12:04:51

Also, consider using clojure.java-time which wraps the java standard library instead of joda.

Sagar12:04:37

how to assign variable in selmer ?

deg13:04:44

I'd like to "dip my toes into the water" of deep learning in Clojure. Where are the right places to begin? The ideal for me would be a "hello world" sized project from which I could explore by reading its dependencies and building on its project.

dpsutton13:04:18

https://neanderthal.uncomplicate.org/articles/guides.html see "Deep Learning From SCratch to GPU" I imagine

Zachary14:04:30

@dpsutton thanks for the post this is awesome

dpsutton13:04:23

8 part series 🙂

deg13:04:42

Thanks. Actually, that's where I started but sadly got lost at the first two lines of "basic setup": - In "Getting Started" it's not obvious (though I can guess) if the tasks under Installation are needed, or are superseded by the next section With Leineingen - In "Hello world" there is basically no readme; nor is the project setup to work with lein run. I don't see how to take the first baby steps. It is obvious that a lot of work and love went into Neanderthal and the "Deep Learning From ..." articles. I don't want to be "that guy" who is bothered by the tiny bits of instruction missing at the beginning. But, I'm stuck.

dpsutton13:04:17

you absolutely should be that guy

dpsutton13:04:23

because you are the target audience

deg13:04:14

Ok, yeah, you are right. But, I had hoped to learn a bit more first and make sure that these weren't just my personal blind spots. But, yes. I'm stuck at those points.

mathpunk14:04:49

hm, I think it's saying, you'll have to choose an engine with either #2 or #3

mathpunk14:04:09

that you can either put a jar on the classpath manually, or use Leiningen

mathpunk14:04:40

as for the jvm-options, I'm not sure about "--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED" in jvm-options-form

mathpunk14:04:31

the sole time i tried some DL, getting the engine set up correctly was a bear