This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-05
Channels
- # announcements (16)
- # babashka (10)
- # beginners (80)
- # calva (18)
- # cider (10)
- # clojure (96)
- # clojure-austin (1)
- # clojure-europe (52)
- # clojure-france (6)
- # clojure-germany (2)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-seattle (3)
- # clojure-spec (4)
- # clojure-uk (25)
- # clojurescript (97)
- # community-development (2)
- # cursive (7)
- # datomic (13)
- # figwheel-main (5)
- # fulcro (13)
- # inf-clojure (1)
- # jobs (3)
- # off-topic (33)
- # pathom (10)
- # polylith (8)
- # re-frame (7)
- # reitit (8)
- # releases (1)
- # reveal (2)
- # ring (4)
- # ring-swagger (1)
- # sci (6)
- # shadow-cljs (102)
- # slack-help (1)
- # spacemacs (28)
- # tools-deps (9)
- # vim (1)
- # xtdb (3)
i just learned about clojure.tools.macro
, in particular symbol-macrolet
. I have an urge to overuse the heck out of this. a tasteful example: https://github.com/swannodette/logic-tutorial/blob/master/src/logic_tutorial/tut3.clj#L16
I didn't get that example. What is it doing, what is lvar?
What's unify?
it doesn't because then they are all the same lvar. but rather than write (== [(lvar) (lvar) [(lvar) (lvar) 'milk (lvar) (lvar)] (lvar) (lvar)] hs)
he made a macro that the form _
expands to (lvar)
(macroexpand
'(macro/symbol-macrolet [_ (lvar)]
(all
(== [_ _ [_ _ 'milk _ _] _ _] hs)
(firsto hs ['norwegian _ _ _ _])
(nexto ['norwegian _ _ _ _] [_ _ _ _ 'blue] hs)
(righto [_ _ _ _ 'ivory] [_ _ _ _ 'green] hs)
(membero ['englishman _ _ _ 'red] hs)
(membero [_ 'kools _ _ 'yellow] hs)
(membero ['spaniard _ _ 'dog _] hs)
(membero [_ _ 'coffee _ 'green] hs)
(membero ['ukrainian _ 'tea _ _] hs)
(membero [_ 'lucky-strikes 'oj _ _] hs)
(membero ['japanese 'parliaments _ _ _] hs)
(membero [_ 'oldgolds _ 'snails _] hs)
(nexto [_ _ _ 'horse _] [_ 'kools _ _ _] hs)
(nexto [_ _ _ 'fox _] [_ 'chesterfields _ _ _] hs))))
(do
(all
(==
[(lvar) (lvar) [(lvar) (lvar) 'milk (lvar) (lvar)] (lvar) (lvar)]
hs)
(firsto hs ['norwegian (lvar) (lvar) (lvar) (lvar)])
(nexto
['norwegian (lvar) (lvar) (lvar) (lvar)]
[(lvar) (lvar) (lvar) (lvar) 'blue]
hs)
(righto
[(lvar) (lvar) (lvar) (lvar) 'ivory]
[(lvar) (lvar) (lvar) (lvar) 'green]
hs)
(membero ['englishman (lvar) (lvar) (lvar) 'red] hs)
(membero [(lvar) 'kools (lvar) (lvar) 'yellow] hs)
(membero ['spaniard (lvar) (lvar) 'dog (lvar)] hs)
(membero [(lvar) (lvar) 'coffee (lvar) 'green] hs)
(membero ['ukrainian (lvar) 'tea (lvar) (lvar)] hs)
(membero [(lvar) 'lucky-strikes 'oj (lvar) (lvar)] hs)
(membero ['japanese 'parliaments (lvar) (lvar) (lvar)] hs)
(membero [(lvar) 'oldgolds (lvar) 'snails (lvar)] hs)
(nexto
[(lvar) (lvar) (lvar) 'horse (lvar)]
[(lvar) 'kools (lvar) (lvar) (lvar)]
hs)
(nexto
[(lvar) (lvar) (lvar) 'fox (lvar)]
[(lvar) 'chesterfields (lvar) (lvar) (lvar)]
hs)))
@UQ4RJ22EA unify means to unify the meaning of a logical variable. (unify (A 3) (2 3))
would unify the logical variable A with 2. I made up the signature of unify
here but that's the general idea
I have 2 screens on our customers system that are meant to show the same data, they don't. It doesn't match up all the time. I asked what I thought was a simple question, "which one is wrong?". "Don't know". Ok, I'll rephrase, for the current settings... What is the correct vlaues that should be shown? "Don't know." ".... Do you see my problem?" "It needs fixed." "Yes, it does, but how am I supposed to fix it if I don't know what the values to be displayed actually are or what one is wrong (they could be both be wrong)." "It needs fixed."
... but DID YOU FIX IT? 😄
and the SQL behind both of them is wildly different, and both equally impenetrable.
A problem well defined is a problem half solved. Henri Poincarré. It seems you're not there !
When the work request is “I don’t know what I want,” then “I don’t know how to do that” is a valid implementation.
I want to scribble that all over the people I work withs faces with permanent marker
I know that feeling.
one step deeper @qmstuart, I have guys matching your description AND not agreeing with my solution.
There seems to be a DRY violation. Two separate things (SQL queries) represent the same knowledge.
Sometimes you can tackle the problem by disentangling and the original intent (and bug) becomes clear.
[For Hire] [Remote] Hello, everyone. I am a full-stack developer specialized in MERN stack as well as Laravel, MySQL, Javascript/jQuery, CSS/SCSS, HTML5. My focus is always on building the best secure, reliable, and with good User Experience websites. [25 USD Hourly] Skills: -React -Vue.js -Node.js -Express.js -Laravel -Mongo DB -MySQL -JavaScript/jQuery -CSS/SCSS -HTML5 I think I can help you with my skills as a developer. If you are interested in me, please inform me. I am open to work and can start right now. It'll be my great pleasure to work for you. Thanks.
Hi there, this is considered spam for a few reasons: • wrong channel • no obvious links with Clojure
wait, so it was an on-topic post? 😆
I smell a Monty Python skit
breaking news: clojure
isn't a superset of edn
:
'1
is a valid symbol
in edn
But in clojure it is (quote 1)
''1
evaluates to the '1
symbol
'
is a valid symbol in EDN, also '1
whereas in Clojure this is expanded into the special form (quote 1)
of course (symbol "'1")
works
also 'foo/'1