This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-24
Channels
- # beginners (12)
- # cider (3)
- # clara (3)
- # cljs-dev (3)
- # cljsrn (19)
- # clojure (83)
- # clojure-android (1)
- # clojure-dev (15)
- # clojure-dusseldorf (1)
- # clojure-greece (30)
- # clojure-italy (10)
- # clojure-madison (1)
- # clojure-nl (6)
- # clojure-russia (274)
- # clojure-spec (51)
- # clojure-uk (31)
- # clojurescript (38)
- # core-async (7)
- # cursive (11)
- # datascript (1)
- # datomic (63)
- # emacs (10)
- # figwheel (1)
- # hoplon (27)
- # jobs (11)
- # klipse (4)
- # lein-figwheel (1)
- # lumo (6)
- # nyc (1)
- # off-topic (278)
- # om (12)
- # pedestal (10)
- # protorepl (31)
- # re-frame (13)
- # reagent (23)
- # remote-jobs (1)
- # spacemacs (9)
- # untangled (24)
- # yada (54)
@john hmm. interesting article, but prima facie a bit over the top, imho. need to study amp more. but anyway: do we really have a choice, other than the 5 horsemen of the apocalypse? last line: "As I've said before the power of the web lies in its decentralization, it lies with its edge nodes – that is, with you and me. If we reject AMP, AMP dies." good luck with that. if you can get rid of the profit motive, the web will be a paradise of free info.
It's probably like facebook. Wise advice for a business might be "don't fully depend on facebook, but go ahead and exploit what benefits it can bring you."
dunno. i guess it depends on your biz. lots of people got rich building businesses on ultra-crappy ms software, back in the day.
if i need to make payroll, and amp helps me do that, the last thing i'm going to do is fret about how open it is. "Sorry we have to lay you off, Joe, but we think internet openness is more important than you."
@mobileink: you're doing a startup now ??
Best use case for AMP is probably click bate fodder. And there's a lotta money in that! Brand sensitive content is probably better served outside of AMP, perhaps leveraging it's optimization guidelines.
@qqq why not? if you're a "self starter willing (scratch: eager) to work in a,fast-paced environment" ... no, I got nuttin.
@john well thanks for prying my eyes open. at the moment i'm just interested in web app optimization. amp seems interesting but naybe not the whole pkg.
well i look forward to resuming this conv. in a few months, after i have had some time to more closely inspect it.
Does someone use a gnu/linux in a vm as main workstation ? I saw the surface pro and I might switch my 2011 macbook for it.
I've tried. Never liked it. You want to do some android dev that for some reason runs better in a linux dev env. Now you're running an android emulator in your vm... all bad. "Ubuntu in Windows" might end up being good though.
that blog post has insights about a bunch of bad mistakes I've seen startups make
but most of them are not specific to clojure
sorry to see you leave... I've mainly used cljs and it's the best dev experience I've ever had in my life. (compared to the JS ecosystem's horrible tools ofcourse)
I dunno. There’s some good critique in that video and the accompanying article, but my conclusion is not quite the same as the author’s. I’ve done professional ruby and I’ve done professional clojure and there are real pains at dev time and run time in both. I get the sense that the author is discounting the ruby/rails pain because they’ve paid the cost already, and making a bit much of the clojure/jvm pain because it’s unfamiliar.
And I mean it’s not an irrational choice to stay with the familiar! Business value is what (most of us) are generating.
I pasted the links from Twitter because I found somehow Clojure stopped growing before I joined Slack. And seeing from Google, like many other non-Clojure programmers, it's very likely Clojure stopped growing.
If you’re faster with the comfortable thing, by all means, that’s probably your best bet.
I've seen a startup waste a lot of time (and the money that goes with it) on a clojure rewrite that was not strictly needed, with a team that didn't really know clojure yet. But that's about what you know and what you've built, not about the strengths of clojure itself.
I think clojure has a long life ahead of it and will always be a niche language
yeah, it's not going to be a good introductory langauge any time soon, that's an intentional choice in the design
@jiyinyiyong there's a talk where rich hickey compares it to a piano vs. a cello - where the piano is simpler to approach at first, but the cello offers an extra expression and flexibility, and he wants clojure to be like the cello
so if there's a design tradeoff that gives you more power, but makes things more confusing for a newcomer, he will probably go with it
(that's a broad generalization of course, but it's a pattern...)
there are always newcomers to clojure, and that's fine - but if you haven't programmed at all, learn scheme and ocaml first, then clojure is great!
but without a foundation like those languages that are more beginner friendly and introduce clojure's concepts - it's easy to get lost
they are beginner friendly in a way that clojure is not
and I'd argue scheme is probably the best beginner language out there
but I mention them specifically because they are more internally consistent and self-explanatory than clojure, and introduce most of clojure's best features
I was under the impression that clojure was pretty easy to learn because it took a newcomer only 2 days to send a pull request for an issue in a re-frame webapp...
I don't think learning new languages is the only way to solve that problem, you see we have Webpack in the JavaScript world, it's very hard to learn at first, but with a lot of work like guides and scaffolds, now a lot people are using it. It's unlikely we have an only way
@akiroz newcomer to programming or newcomer to clojure? what I'm saying is it's not a good first language
But basic stuff doesn't require interop. Don't you think basic concepts that are taught in scheme could be taught in clojure just as easily?
@john until you make a mistake
then you need to understand the vm before anything makes sense
there are languages that try to enforce the facade of their abstractions over the host, and clojure is emphatically (and intentionally) not that
remind me of https://i.imgur.com/er0tV3O.jpg , but didn't find one about Clojure
But that's the benefit of clojure, IMO, the abstraction. Which can be retrofitted on lots of host environments.
@john but you won't see a CinC that performs at well as clojure on the jvm, because the jvm is an amazing piece of work and clojure simply doesn't have that manpower. But clojure prioritizes the design decisions that let us leverage the best vm we can find as fully as possible with lispy abstractions too. So the fact that CinC isn't around is part of why clojure is so great.
@noisesmith I was more thinking about for educational purposes, like with scheme. Mostly a mental exercise.
I really think racket already owns that - being a lisp made for education
it even has immutable collections and laziness (though not as defaults)
right - it can leverage the ubiquity of js, and all the great APIs we can tie into it etc. and full access to anything js can do
So if some dev shop can't fall in love with the abstraction, that's not evidence that more people aren't getting into it. Maybe it'll slow down. I'm betting more people will like it.
Like, I wouldn't mind programming in Ruby. I'd just rather do so on a clojure flavored ruby. Maybe there's some genetic thing that makes certain people like certain languages though.
I heard someone talked about business on the internet: how to attract visits, how to make them stay, how to make value out of it. Somehow I think selling programming languages is not very different from it.
That's true. I hear a lot of stories of people having to come back to it a few times. Only took one time for me, so I figure folks brains might just work differently. Like spatial versus algebraic reasoning - some are more biased towards one.
I find the whole business in that blog about 'happiness' really odd. Clojure folks I know site 'fun' as one of the major attributes of Clojure. Then there is this (usual grain of salt) evidence http://www.itworld.com/article/2693998/big-data/clojure-developers-are-the-happiest-developers.html
As for a language for people new to programming altogether - I can vouch anecdotally that people like that engage with it quite readily (3 clojurebridges and several undergrad and graduate students in science, but not compsci)
So, a lot of what has been said just doesn't fit with what I've seen
I just go back to the git-of-theseus graphs, and compare clojure against anything else; assuming I’m building something I want to last, I know what I want to build atop.
@jsa-aerial So I just read/skimmed the article. It appears the complaints are most focused on tooling.
I think it's fair to say that Clojure definitely has a tooling problem. I do think that deserves some addressing.
Clojure's tooling surpasses that in other ecosystems. I find it significantly better than that of Ruby, Python, etc.
Not so much in the statically compiling scenario. In that area, I think CLJ/CLJS creates fairly deterministic behavior.
There are certain places where clojure tooling is dealing with non-deterministic behavior and tooling errors keep showing up in those areas.
I think around testing and debugging and profiling, there’s a lot to improve there (criterium is great for micro-benchmarks but for whole program you just need to use a java profiler that really doesn’t “get” clojure)
Taking figwheel as an example, I think Bruce has done a great job. But in a live environment, there are simply too many variables for one person to deal with all possibilities.
lein, for example, everytime I want to figure out how to do something, I have to go read the sample lein file in the repo.
but once you figure things out, it is very difficult to have the newbie mentality again. It is like the curse of the Monad. Once you understand it, you can’t explain it.
Clojure tooling is very similar. And when someone calls out a weakness in the tooling, lots of ppl don’t take it lightly because they have lost the newbie “feeling”
lein has a massive amount of wiki documentation
yes, but I didn’t find what I was looking for until I read the sample file. And since then, I always just go to the sample file.
to be fair, lein isn’t the only one with this issue. I find that Gradle also has lots of docs, but so difficult to discover things in it.
I’ve used it for years, so I feel comfortable with it, but the docs were very frustrating. And the usual response that just linked to the docs were also frustrating because I didn’t find them helpful.
I consistently hear people saying about figwheel though, "why are my errors being printed twice" and other strange behaviors that seem to only show up in live repl environments.
And again, I don't blame Bruce at all. Weasel is far more buggy and has more strange behaviors and does less.
And part of the problem there is you actually have two separate evaluation environments and the local repl is trying to provide the illusion of a single eval environment.
Maintaining that illusion over more and more complex envs will only get more difficult, if the env is fully mutable and you do more strange, previously un-considered things, like using web workers, for example.
I think a company would have to get behind fighwheel and other tools and really iron out the solution in a manner that makes every intended use case fully deterministic.
But it may be a little too early for that. It may just take more time for CLJ/CLJS to actually be used in all these different use cases before we can actually find the bugs that need to be fixed. You can't account for all those scenarios until they actually crop up.
But to circle back, with regard to statically compiling code, which is what most other languages are doing, I think CLJ/CLJS is at least on par, if not better, than most other langs. It provides the same expected behavior every time. Uses a nice, declarative specification.
I'm with @dominicm on this one - having used Ruby a lot and Python now for while, their ecosystems are just not up to Clojure's at all. They 'work' but are quite a bit more painful. Of course, perl is way worse.
If you start bringing up figwheel and friends, now you are in JS land and JS has some of the all time worst tooling out there
Yeah, I may be complaining from a very "first world problem" perspective, in the land of languages.
@john I wouldn't say most of the other languages that have been brought up are statically compiling - none of Ruby, Python, JS do that
All three of those have a 'live repl' environment - just not all that good
i must say the WTF factor is fairly large in clojure. "principle of least surprise" is not a high ptiority.
Wow - I would say the WTF factor is way less than Ruby, Python and especially JS
JS (like perl) has some of the all time high WTF
Yes, but in this context we are talking 'relative' - what doesn't have some WTF??
ok, let's say the wtf factor in clojure is surprisingly high. not just "wtf?", but "wtf, that should not be a wtf." 😉
Once you start to appreciate the consistencies in clojure, you more appreciate that you can't (into {} [:a 0 :b 1])
by default.
same reason (conj {:a 0} :b 1)
doesn’t work
Actually that consistency is what makes the WTF in Clojure a lot lower than in others
into takes a transducer, imagine how complicated it would be if your transducer sometimes got a key and sometimes a value, all in one series
(almost) anything can be a map key; a vector with an even nbr of entries "should" be easily convertible.
converted when? by what rules?
conj is varargs
Most clojure WTFs have to do with dealing with non-deterministic behavior of the host environment.
Exactly @noisesmith
@mobileink allowing the flat list input would lead to a bunch of really annoying and surprising special case rules
Actually, again, least surprise is better IME than others
for transducers and conj
and again, because of the consistency and well set up abstractions
Its those two things in particular that make Clojure much better to work with than CL or Scheme
a big wtf is the fact that map, rest, filter, take etc. don’t preserve input collection type - it’s done for good reason, but I see it trip people up a lot
but it’s still a widely applied sort of rule, not a special case thing “each function has a preferred output type”
internal consistency is one thing; consistency with well-understood models (math, lambda calc) is what really matters, imho. clojure is very good at the latter, but not perfect, hence some wtfs.
I occasionally believe that lazy seqs were not the best default choice
the fun thing is you can avoid that by not using the lazy functions though - which is very easy now that we have transducers
(once you know which things are lazy at least)
yeah. unfortunately, I internalized clojure before transducers and have yet to actually bother to learn to reach for them by default 🙂
@donaldball “use it with into and provide fewer args” works very often
@donaldball me too! 😢
I do aggressively realize seqs before returning them in my fns though
it’s amazing how many times I took (->> x (f) (g) (h)) and turned it into (into y (comp f g h) x)
@donaldball try considering how clojure would be different without lazy seqs though. Lots of efficiencies are gained that we take for granted.
working with potentially infinite sequences. Which I think is being exploited more often than we usually think about.
In an alternate clojure impl, one could imagine lazy seqs being a thing and also that map
and friends preserve seq type, possibly giving a simpler dev experience, but it’s really neither here nor there
Clojure rides this fine edge of laziness while still allowing eagerness when you want it. it wasn't entirely clear it was going to pan out as cleanly as it did, when it was being designed and rolled out.
I'm not sure there are (or were, before) any languages other than Clojure that allowed such a heterogeneous environment of both laziness and eagerness, where both seem to work together cleanly.
another thing is that Clojure (on the jvm) does speculative/optimistic computation - it may retry computations. Such behavior is better served by lazy evaluation, when large cascades of eager evaluation aren't forcing all retries everywhere.
anyone else use sendgrid and have their unsubscribe stats always show a 0? I can see from the webhooks that people do unsubscribe sometimes, was just trying to figure out if it's happening to anyone else.
accidentally posted a msg to #beginners that belongs here, about blockchain. you might not use clojure to implement bc, but apps that use it are a different story. anyway, it's looking to me like a massively disruptive bit of tech.
@mobileink you might be interested in http://status.im. They're leaning heavily on CLJS for their mobile app. And I believe they let you build DAPPS with CLJS. The actually "ethereum node" is built on Go though I believe.
http://Status.im might actually be one of the largest open source, public facing CLJS project that isn't being talked about much in the community yet. Could be a "killer app" success story for CLJS, if http://status.im takes off.
anybody know of a clojure lib that will let me put more hours in the day? or make me much smarter? i get tired just thinking about all the stuff i need to learn.
speaking of wtf: "With Status your mobile device becomes a light client node on the Ethereum Network..." undoubtedly the "Ethereum Network" is in favor of goodness.
I still think the underlying assumptions of all blockchain tech assumes certain democratic behaviours that work if you can guarantee personal identity matches transactional identity one-to-one, but utterly collapses when one person can be fronted by many virtual identities.
a.c. clarke: "Any sufficiently advanced technology is indistinguishable from magic." i have to revise my examples of this every few years. a while back it was public key encryption. now it's BC.
Even the underpinning security and checks-and-balances tech collapses when those assumptions fail.
It has never seemed sufficiently impervious to wealthy or resourceful bad actors, thus annihilating the decentralized aspect it aims to achieve.
on tooling: TBH, I find lein to be one of the best tools I've ever used. python - what if all dependencies are global and every version is a breaking change? js - what if you need to write a program to build your program? java - what if everything is in XML? C(++) - what if there's no package manager?
@fellshard still makes me nervous. "it cannot possibly be hacked" sounds like a recipe for eventual disaster. but nobody can hack my stash of gold ingots (i wish!).
Especially when we've seen repeated failures and subversions of existing blockchain currencies.
you want amazing? the fact that after all the failures we ("we") still think a secure tech is,possible.
"blockchain is secure" is isomorphic to "the price of tulip bulbs (or real estate) will always rise"
it's kinda terrifying, actually. imagine a big chunk of the economy dependent on bitcoin (or whatever). then it gets hacked. ka-boom goes the dynomite.
i do, but you see what i mean, yeah? "single source of truth" always ends badly. think in engineering terms. if everything goes thru a,single node, you're screwed, eventually.
That's the sell of the block chain. A kind of singular representation of the truth, abstracted over a network.
If they can dupe Morgan Stanley to build significant investments on it, this early in the tech, yeah. I don't think most orgs are going to trust it that much yet. I mean, China owns most of the canonical blockchain ATM lol
And it is a matter of trust, the same reason we have certificate authorities, for example. Decentralizing only makes the routes of trust harder to trace, and allows bad actors to hide behind the veil of many smaller actors.
Centralized trust can be centrally and publicly examined; distributed trust, if compromised, can also compromise attempts at public examination, in direct contradiction to its own claims.
I think some magical unicorn might be possible in the future. Threshold cryptography was being talked about a lot when the first bitcoin implementation was released.
trust is also the foundation of money. a dollar bill is just a worthless piece of paper if people don't trust the "system".
otherwise you just have your own suite of parties collaborate and ignore the democratic whole
I'd personally take BC over a couble of important guys (what we have today) anytime.... atleast BC trust is backed by computational power which you can't pull out of thin air.
But one person with enough cash can make an invisible central authority with zero accountability; that's worse than a known, public actor.
i wonder what the badass econimists have to say about digital currency. i doubt very many of them have much tech competence, tho.
If only we could get Friedman's analysis on it. You can still analyze it in terms of the parties involved and their interactions, I think, without needing to understand the mechanics that provides those guarantees.
think nation states, which have (effectively) infinite resources. Fredonia has switched to BC. Altonia doesn't like Fredonia's attitude. In the old days they could counterfeit the currency to destroy the exonomy. Now they can just hack the algorithms.
or maybe they don't need to hack the algorithms, i don't know them. maybe they just need to infiltrate the minting farms.
that's what i'd do if i were the nsa/gsb/whatever. why spend millions cracking sth when you can bribe somebody to give it to you for a pittance?
If you control 51% of the network, you can own the network. They need to resolve that. They need stronger guarantees in the face of untrusted participants. And transactions are too slow to accommodate a global economy.
Is it an actual mathematical transformation, or just a monadically wrapped atom, effectively, where the actors don't get access to the actual state?
@john: proposition: nobody can ever "own" the network. that would imply that attackers could never succeed.
yup 🙂 MS published a major improvement, making it within a few orders of magnitude of maybe usable performance wise
But now they're saying neural networks may provide a shortcut to homomorphic encryption.
the thing about proofs: in the wild, they're not really proofs. they do justify an increase in confidence, but that's different.
there's some truth to that. Like with whole operating systems. How invariant are your invariants, really?
plus: big data doesn't care about (formal) proof. which opens a whole 'nother can of worms. instead if truth and validity (logic) we have reliaibility and validity (stats).
One interesting insight about proofs and programming. Every program is a theorem. An execution of that program is its proof.
@john close but not quite. "execution" is not relevant. programs are proofs, not theorems.
Usually, in math, the theorem in question is talking about an infinite sequence, which makes naive evaluation problematic. So proofs seek to to leverage some other evaluation path that proves the behavior.
So proofs often provide some additional execution path that corroborates the expected behavior
But, fundamentally, a program is a specification of some behavior and the execution of that specification is a standing proof of the specification, as it maps that specification to some specific behavior.
(+ 1 2) = 3 is not a theorem. you could call it an instance of a theorem, i suppose.