This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-01
Channels
- # aws (1)
- # beginners (237)
- # boot (2)
- # calva (6)
- # cider (16)
- # clara (10)
- # clj-kondo (1)
- # cljs-dev (24)
- # clojure (29)
- # clojure-brasil (2)
- # clojure-dev (20)
- # clojure-europe (1)
- # clojure-italy (56)
- # clojure-japan (1)
- # clojure-nl (16)
- # clojure-spec (12)
- # clojure-uk (12)
- # clojurescript (24)
- # clojureverse-ops (3)
- # core-async (3)
- # cursive (21)
- # datascript (5)
- # datomic (82)
- # devops (5)
- # duct (14)
- # emacs (2)
- # fulcro (2)
- # jobs (6)
- # juxt (7)
- # kaocha (6)
- # leiningen (19)
- # luminus (3)
- # nrepl (51)
- # off-topic (208)
- # other-languages (1)
- # re-frame (8)
- # reagent (9)
- # remote-jobs (6)
- # shadow-cljs (37)
- # spacemacs (6)
- # testing (12)
- # tools-deps (25)
I was looking up info on instaparse and ran across this guy's website (also has an active YouTube channel). Whoa! Lots of great condensed info / tutorials besides his clojure writings. http://xahlee.info
yeah I definitely read a bunch of his tutorials when switching from vim to spacemacs
Anyone knows what's going on with all the recent Tesla news? Seems to be bimodal: one side: Tesla is going to fail. Short short short short short short. other side: Tesla is the greatest innovation since iPhone.
I am not trolling. But I have a very serious question about the future of the JVM. I am starting to doubt if its needed anymore. If so many things are going server side where we can control the machines. Am I wrong?
If the JVM was awesome for set top boxesā¦ pos, tv etcā¦ why do we need it now? Iot seems to be going native, Cuda is native, web servers are nativeā¦ etcā¦ And android is leaving the JVM for flutterā¦ Someone convince me I am wrong?
I donāt want to invest years into any languages that could dissapear overnight if Oracle yanks any more plugs
sorryā¦ I know it is kinda of negative to ask thisā¦ but Iād prefer to face facts nowā¦ and not realize I made a mistake, 3 years laterā¦ like I did with Rails
is there any plans to make Clojure compile to native code?
the jvm has a deep and wide set of libraries, has many man years of work in the vm itself, is entrenched in many businesses, and there are non-oracle builds available
I agree. I like the library supportā¦ but many people are telling me the memory usage is costing them server costs
regardless of the ideas of how it would be used when it was started, it has been largely used for server work loads for decades now
I really love Clojure and Kotlin
but I think they need to go native to survive
Itās kind of frustrating right nowā¦ I love Clojure over Haskell
because companies arenāt going to pay the high license costs to Oracleā¦ they will have to use the open jdk
https://www.techempower.com/benchmarks/ is the largest set of benchmarks for webservers I am aware of, and jvm based stuff always does very well
yesā¦ itās very good. I saw that.
top of the charts
personally, I am ok with the memory usage
but I think the memory usage could be a problem as devices become smaller
and energy efficient is needed
well, itās the same ideaā¦ server energy costs or IoT device costs
feel free to correct me
I could be totally wrong
from what is just a small computer (a pi or a beaglebone) to something that is actually a different environment like a microcontroller
ClojureScript can also target node.js, so even if JVM ecosystem became toxic over night (won't happen), Clojure would still have a host language with a huge ecosystem
but in general those kinds of devices have a long history of using virtual machines to achieve higher code density then they normally can
wowā¦ 2 good points
hmm. ya, I am just as afraid about relying on the V8
the jvm runs great on a pi or the beaglebone, I've actually built a little rover on a a rc car body that had a beaglebone running clojure as a brain
wow really?
I need to try a jvm install on my rasp
it was a long time ago https://www.youtube.com/watch?v=XMIKfOmAMjQ
there is 1 thing I love about virtualizing things
I love VMWare for that reasonā¦can just reset itā¦ if something breaks
snapshot it, break it, rollback
Why do you think that? The jvm performs great compared to native is my experience, just the startup is slower, but many things run for a long time.
I think it just uses more memoryā¦ garbage collectors
I am watching video
did you try the make block kit?
maker bot?
I don't know that anything there will be relevant to this conversation, it is just an existence proof of the rover
well, if you used jvm on a raspā¦ that is proof
the smallest device Iād use is a nano
it is a beaglebone, which is similar to a pi (but has some nice additional features like the prus)
ya, thatās super cool
I bet that opens doors for you
it was a hobby that I kind of moved on from, too much like my actual work (but very cool)
ya, I have a bunch of electronics sensors, kitsā¦but little time
I setup the maker block robot kitā¦ with a pi
ok, I feel betterā¦ about JVMā¦
I think I am going to keep pushing forward on Clojure and Kotlinā¦ I love both languages
if the JVM situation got really dire, I'd count on someone like Google or AWS to fork the runtime (or create a new runtime that is compatible w/ Java libs). There's simply too much invested into that ecosystem to let it die
yaā¦ when I first started looking into the functional worldā¦ I tried Haskell, first
but then when I saw Clojureā¦ I fell in love.
I am going to try typed Clojure thoughā¦ I am not totally sold on the false paradigm of static versus dynamicā¦ I think both have their place in the world
FWIW, I think that spec offers everything static typing does and more (with the exception of being runtime rather than compile-time, but that makes less difference than you'd think). In typing terms, spec is similar to advanced dependent types like Idris has. And just to reply to the original question while I'm here -- the future of languages is hard to predict, but I feel very confident that the JVM will still be in common use a decade from now. Past that, I could easily see it being replaced by jvm-bytecode-to-native toolchains like GraalVM aspires toward, or for that matter other things that we haven't heard of yet. But for the short and medium-term, the JVM isn't going anywhere š
thatās a whole other blog post though. hahahaha
and they canāt get sued because itās openjdk?
right?
https://adoptopenjdk.net/ is also great
wow, Solaris too. I love their file system.
I build the same microservice (using Kafka and PostgreSQL) on Rust, Kotlin (with spring), and Clojure, memory of Rust was much lower, but cpu was higher..
ZSH has amazing snapshot capability
@gklijs are you liking the Rust ownership model for concurrency?
It can be hard sometimes, but that also makes it more rewarding when you do get it to compile.
Also. I need to decide on using Kafka or Spark for my first real data toolā¦. I will be reacting to 1000's of messages per minute
ya, just a start
I think most CPUās max at about 20k messages per second
on the network IO
Java does fine with that scaleā¦ or JVM
is Kafka good for that? real time?
Yes, can be in milliseconds. You do have to make a trade off between throughput and latency. You even risk messages getting lost for a bit less latency, it's all configurable, but that can be overwhelming as well.
hmmm. this is for an api client, reactive, real time
I think latency would be more important. I can lose a few messages
I have a demo setup with a GraphQL endpoint, end-to-end latency is about 100 ms, but could even be a bit less.
on github?
if you want, I can take a look. I donāt care if you use it for work. Sounds like a fun project.
I like to load test
I was going to put up a Kafka or Spark setup repo on githubā¦ test it for performance
I think I will put the whole setup, including kotling, rust and clojure variants on there. I also have a load test program, and a way to display the statistics from the load test. Just need to improve the docs a bit, and add some cli/bash-script to make it easy to run it.
I can help write the docs too. I write well.
and I write bash/sh
are you using JMeter tool or something else to load test?
Thanks, but there's a buch of stuff only in my head now. Just clojure, I set the load with an Nrepl, and meeasure cpu/memory also from clojure. Put the data in one .edn file, and can compare several runs with vega
is there anything I could do to start it? focus on Clojure with Kafka?
Kafka Streams API is really nice, but much easier to use with Kotlin then Clojure, especially with combined with Spring.
Spring Boot? or just Spring?
I was looking at Vert.x
I am 100% sold on Kotlin
Vert.X can be nice, but in my current project they made a mess with it, and was not used for being reactive..
okā¦ how about I setup a simple Kafka projectā¦ Kotlin or maybe Clojureā¦ and you check it out
let me know how it can help you at workā¦ whether load testing, proof of concepts etcā¦
You could review/add when it's almost done, if I put it first as a private repo. Will take a few weeks, and still not 100% sure about putting it public.
that would begreat
trying to polish up my github with newer techā¦I usually wait to make it public after I polished the docs
I hate git repos with bad docsā¦ I had to make a few repos last night, private
ohh. are you using VueJS? or just backend?
It's a bit mixed with mine, I got a Rust library that's well documented and well tested, but the rest is more or less dying.. Also like part of the clojure stuff could be library. As far as I know there isn't really a recent clojure kafka library. Since the api is stable I think it would be nice to just Have some wrappers around the Kafka api as a library, making the dependency to Kafka provided so it can be used with newer versions of Kafka easily.
I do need to look into Rust/C for WebAssembly, also
Current backend is a vary ugly Angular/AngulerJs hybrid, with only gets/posts to the server..
hmmm. I left off at Angular v1
I like Vue because it has the command line
There so many things these days š. Also want to take a look at nats https://nats.io/ sounds very much like kafka but easier to run in the cloud (but kafka is also going to improve on that)
maybe you could use a Vue proof of concept?
I'm leaving there soon, and really like re-frame myself. I hardly hear anything about Vue here (Netherlands) It's mostly Angular and a bit of React
React is very good too. Vue just has better dependency setupā¦ little more modular
going back to typing. if you want a FP language with mixed dynamic and static typing, Racket is probably the current best choice. Typed Clojure has languished (though hopefully not dead)
wellā¦ Clojure is so goodā¦ I can forgo typing for what I doā¦ I am not building airplanes or avionics systems that can crash from 1 bug
I wouldn't say it's languished. Ambrose just hasn't made a ton of waves about it recently. I think he's in the midst of delivering his thesis on the subject.
eh, the type checker crashes and takes out the running process and current defaults/assumptions for type annotations are painfully inconvenient
yeah, he defended last week. hopefully he isnāt burnt out and/or can now be more open to others contributing
itās considered anti Clojure culture? static types?
@codestar8 static types are generally viewed as not being worth the trouble by Cognitect and that belief does influence some Clojure users
probably because we focus on data, data science, number crunching etcā¦?
not building mars rovers
Clojure is being used to write all kinds of programs. I do think Cognitect tends to work on projects (web backends, data processing pipelines) that donāt really need types or where types can be painful to manage
but if youāre trying to use Clojure for, say, anything related to compilers and program analysis, then types are kind of useful
I listened to a StrangeLoop talk. And these 2 people blasted Clojure. Said crappy Rails devsā¦ are now crappy Clojure devs. Kinda of hurt my feelings. But I do understand their reasoning for types.
yeah, thereās no need a belief about type systems needs to result in personal attacks
ya, nothing personal. but they had a lot of wisdomā¦knew a ton about type systems. but when they suggested ocamlā¦ I was thinkingā¦ hmmm. it has a global lock on the interpreter
though I certainly understand the frustration of someone who enjoys Clojure but wishes the core team was committed to gradual typing š
I think optional or gradual typing would spread Clojure to the Scala and Haskell types
if anything, we might even have the most robust type system because of macros/meta programming?
People say Rich and Cognitect are "against types" but I'm not so sure I've seen evidence of that. They seem to just want some features to be option. Like CPS/core.async. If someone came up with a great static verification tool for Clojure, I'd imagine lot's of people would use it, including Cognitect
Or even an Erlang actor model ported over to CLJ. If someone made a stellar implementation, I'm sure lots of folks would use it. And probably Cognitect too, even if they don't want such a thing in core.
thereās no actor model for Clojure, yet?
horizontal scale out of the box?
There's an actor thing IIRC, but I think it did some bytecode manipulation on top of Clojure's
I think Rich has a background in real time data systemsā¦ machine learning type stuffā¦ probably shaped his view of the world
Well, there's a war out there about whether type systems should be religiously bolted on to languages, such that they won't work without them... It think that's a different argument
opposed to building an airplane system
Type Script did things right
but to be fair, static types didnāt save that 1 nasa projectā¦ what was it? Orion?
crashed billions of dollarsā¦ because of 1 bad metric/imperial conversion calculation
joke comingā¦ we all should just use ADAā¦ works for missilesā¦ should work well for web. :rolling_on_the_floor_laughing:
having ātypesā isnāt a panacea. but modern type systems (e.g., Haskellās or Rustās) trivially support something as simple as a missed conversion
or Clojure Spec, test data driven dev?
I think spec is a missed opportunity to embrace gradual types. in certain cases, spec could be used to annotate structural types and be statically checked. for other cases where arbitrary predicates canāt be avoided for describing the data, or on typed/untyped borders, specs can then be used for optional runtime checks. and of course they could still be used to generate tests
Thereās a project thatās doing this: https://github.com/arohner/spectrum
remind me againā¦ predicates? newb alert,here
type systems allow you to express various constraints on a value (e.g., variable x
represents some unsigned int
)
but letās say your type system didnāt support specifying that something is unsigned. you could instead use a predicate (fn that takes a value and returns true/false) such as: (fn [x] (and (int? x) (<= 0 x))
but now you have a function that must be run to determine whether something is correct. so now your ātypeā depends on runtime information because it must evaluate the x
I watched a Microsoft research videoā¦where they monitored devs in the labā¦ they did conclude that types sped up dev timeā¦ said devs do less reading of what the function does
if they know what types of arguments it takesā¦ less need to analyze the guts of the function
https://medium.com/javascript-scene/the-shocking-secret-about-static-types-514d39bf30a3 > Type correctness does not guarantee program correctness. Which is I think where Cognitect seems to focus on. Itās not that they officially dislike types, it appears that they want to incorporate the benefits while addressing the shortcomings rather than repeating what other languages already have.
the conclusion seems too simple. maybe itās also the case that more bugs are found (and fixed) in statically-typed languages and thus the āliveā bug density for a statically-typed program is smaller
I think TypeScript took off becauseā¦ larger teams have trouble managing big JS code basesā¦ for exampleā¦ 6 different ways to define a function in JS
one time, I spent half the day looking for 1 JS method because they used 1 of the uncommon method declarations
I imagine itās kind of like transportation technology from way long ago. At one point the answer to āWhatās the fastest way from point A to B?ā was āHorses. Duh!ā Then someone had to come up with the idea of a car. āWhatās the fastest way to make JS more stable?ā āStatic types. Duh!ā So they looked back and remembered the virtues of static types. It may be the best way to achieve that, but I think itās important for people to take a look at those concepts and try to find alternative solutions, even if itās a derivative of what came before.
so the newest/favorite languages in my stable (horse pun š ) are golang and clojure, which I would consider complete spiritual opposites
golang's "type everything" approach combined with its "really rigid and simplistic syntax, abstractions are evil" approach go very well together
that combined with its standardized toolchain makes it really easy for blub devs to jump into a golang project and get out without too much beard stroking
clojure leans into the dynamic functional tradition of "define/test absolutely as many abstractions as possible so that the main loop is very terse and lean, and so long as you know what the abstractions do, and can trust them (due to tests/specs), your main loop should just be your relatively easy to understand business logic, with all of the implementation details tucked away"
in this model, all that's left to do once you've imported your toolset of abstractions, is write integration tests for your business logic. static types don't necessarily help with integration tests all that much
Thereās a project thatās doing this: https://github.com/arohner/spectrum
Does the notion of beauty/elegance have pragmatic value in software? I choose Lisp because thereās a purity I find beautiful, but businesses choose lisp because people produce better software cheaper/faster. Do these reasons share some identity, or, at least, some common ancestry?
I suspect thereās common ground between pragmatism and beauty in that simplicity lends to both.
Sure. By that logic, beauty would correlate with pragmatics, but not be an end in itself.
And of course, the notion of ābeautyā depends on a particular aesthetic, which could be highly debatable/individual.
Iād aver that elegance correlates strongly with being easy to learn, understand, and maintain.
Maybe because itās easier to see how different parts fit together, and even suggest/require eachother?
Yes, e.g. when there are powerful, simple abstractions at work, e.g. unix pipes, clojure seqs, datomic entities
Software that is intended to be long-lived or serve a wide audience benefits from such elegance; a one-off ETL job might not.
My wife (a professional musician) and I were speculating yesterday that music is beautiful not when itās simply fitting or simply surprising, but rather when itās āsurprisingly fittingā.
That insight resonates a lot with me. I like some of the more extreme music genres such as dark ambient and the work in that genre I enjoy usually have some sense of structure to them. Even if it shifts and twists in unexpected ways. The works I donāt enjoy focus on repetition or donāt seem to show any semblance of structure to them.
aye, some blend of symmetry and asymmetry. Usually with more symmetry and little novel asymmetry.
Often in good art the chosen symmetries and asymmetries are the non-obvious ones.
Yeah, s-exprs have that āsurprisingly fitā quality.
So little can build up so much.
Iād be interested to know what Hickeyās tastes in art are. I conjecture two cases: extreme realism (i.e, the incidental medium should get out of the way of the picture), or extreme minimalism (the picture should get out of the way of the idea).
(A third case is that Iām reading too much into it :P)
He talked some about microtonal music on a cognicast episode
Ah yeah, that was easy to find: http://blog.cognitect.com/cognicast-transcripts/103
Probably not very illuminating but perhaps thought-provoking
I think @borkdude did his dissertation on a musical system in lisp. There seems to be a lot of musical lispers out there
douglas hofstadter, who wrote the "metamagical themas" column for a time in scientific american (as well as Godel, Escher, Bach), wrote about lisp and music, not necessarily in the same context though, but the various themes he wrote about tended to intertwine. lisp definitely has a sort of compositional/intuitive nature that is reminiscent of music