Fork me on GitHub
#beginners
<
2019-09-09
>
tjb00:09:30

hey team im cross posting from #toucan

tjb00:09:42

anyone here familiar with toucan?

godwin.ko02:09:58

core.match seem pretty cool and expressive, how come it isn’t more commonly used? some other language even promote pattern matching as a key selling point 🤔

seancorfield03:09:22

Probably because we have destructuring built-in and that covers the most common situations of "pattern matching"?

seancorfield03:09:24

We have a test at work (in our GraphQL handling code) that uses core.logic to unify forms/patterns but I don't think we've ever used core.match in eight years of production Clojure... I'd be very interested to hear from folks that are using it, as to what they're doing with it!

alfred.xiao03:09:09

core.match has more features than what I have really used in real projects. I feel most compelling need for matching so far is either matching by raw value or a pred, e.g. match [a b] with ["alfred" 20] or ["alfred" pos?]. both actually can be done using case or cond without too much effort.

kslvsunil09:09:05

Hi All, a noob question, I'm going through Brave Clojure and in Chapter 5 the author asks me to create a REPL for a file core.clj which is the sources directory.

kslvsunil09:09:35

I'm using cursive + IntelliJ and I can only start the REPL for project.clj

kslvsunil09:09:39

this is the code in core.clj

kslvsunil09:09:05

And if I check for the name space in the REPL, it says fwpd.core

kslvsunil09:09:56

But If try to load the core.clj into the REPL I get the following error: "Loading src/fwpd/core.clj... Syntax error (ClassNotFoundException) compiling at (core.clj:1:1). ns fwpd.core"

kslvsunil09:09:06

Any help would be much appreciated!

studio10:09:19

Hello, I am looking for information or to speak to someone who has used ClojureScript with a design system (StoryBook, Styleguidist etc). I can't find much through Google. If there is a better channel for this then please let me know!

studio13:09:33

@jarvinenemil I have looked quite thoroughly at Devcards and while it does look useful it also doesn't seem as feature heavy as Storybook. From looking at the repo too, it doesn't seem to be actively worked on? The last commit was 7+ months ago.

studio13:09:28

@gerred I looked at the Nubank repo too, again it looks good, but is lacking in certain features, like documentation of the system etc that Storybook has.

studio13:09:35

I could be wrong on both counts! That's why I was keen to speak to someone who had implemented any type of design system within Clojurescript - as I am new to the community and struggling to find much else on Google etc

tjb18:09:09

quick update for everyone following along with my journey: i was able to make API requests and have the server respond in JSON! I found Toucan for my DB layer and really really really like it. i was worried i’d have to hand roll everything but this makes it very easy.

seancorfield18:09:17

@tjb 'grats! I don't know how widely used Toucan is -- as the readme etc there makes clear, most Clojure folks avoid anything ORM-like, although we're starting to see some very interesting EQL-style libraries on top of JDBC now (walkable, seql, pathom, etc).

tjb18:09:08

yeah i was reading ORM-style libs are not widely available however i think its nice to use esp if you want to get up and running quickly

tjb18:09:32

i also think having a lib like this makes the clojure ecosystem even more beginner friendly since a lot of people are coming from that type of background

seancorfield18:09:21

At work, everything we do is JDBC-based really and we've never felt much need for anything ORM-like -- I've personally been badly burned by ORMs and similar "helpful" libraries in the past so I have a bit of a knee-jerk reaction to anything that even smells like an ORM 🙂

tjb18:09:03

thats fair enough 😛

seancorfield18:09:17

(I've even given conference talks about the "evils" of ORMs! 🙂 )

tjb18:09:19

so me, i want to get up and running asap and ORMs do the trick

tjb18:09:46

again this is for a personal project / mvp

tjb18:09:53

if i was in a work setting i would weigh pros/cons

seancorfield18:09:04

I'm glad you found something you like. I had heard of Toucan but haven't tried it. It uses clojure.java.jdbc under the hood I think?

tjb18:09:13

correct!

tjb18:09:15

i believe it does

tjb18:09:18

and it uses honey too

seancorfield18:09:01

(I'm doing my best to encourage everyone to migrate to next.jdbc since that's the "next generation" of it, but it's deliberately not API compatible so I know it'll be a fair bit of work for everyone who makes the jump)

seancorfield18:09:46

Sounds like you're really starting to enjoy Clojure @tjb?

tjb18:09:49

hopefully no major blockers. i also learned about thread macros which is very similar to streams in java 8 ifim not mistaken

johnjelinek20:09:40

does anyone know where the ring name came from?

alexmiller20:09:21

I don’t, but I’m going to make up that it’s like the ring that binds in lord of the rings

borkdude21:09:01

funny, I've never really thought about the origin of the name, but my association was a request-response cycle (ring, circle)

henrik22:09:45

I kind of subconsciously assumed it was taken from the cryptographic concept, though I have no idea why it would be so.

henrik22:09:26

Maybe it refers to the noise rather than the object. Why? Why not?

dpsutton22:09:25

What’s the cryptography angle? Like group/ring/field from mathematics or is there something specific to cryptography

andy.fingerhut22:09:39

I suspect henrik's first exposure to rings from mathematics was through cryptography?

henrik10:09:14

Well, everything in cryptography is also mathematics, but cryptography is my reference point. Nevertheless, this is clearly not it.

andy.fingerhut22:09:04

Unless he is referring to a key ring?

alexmiller23:09:38

I know it's at least partially based on Rack in Ruby, and Ring is probably a 4 letter word starting with R that's similar

seancorfield23:09:05

And Python's WSGI which is also a 4 letter word 🙂

seancorfield23:09:22

(sorry, couldn't resist)

seancorfield23:09:46

Given the comments about the unified abstraction in the README, Alex's One Ring to Rule Them All suggestion makes sense. If only we could ask @weavejester?

alexmiller23:09:10

I'm pretty sure that I didn't actually make it up, and that actually was a phrase used in the early days, but I don't have a source. back in 2009 when it was first released, LOTR was considerably more "in the air"