This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-17
Channels
- # announcements (4)
- # aws (17)
- # beginners (108)
- # calva (2)
- # clojure (164)
- # clojure-austin (1)
- # clojure-europe (3)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-uk (98)
- # clojurescript (31)
- # code-reviews (1)
- # cursive (23)
- # data-science (1)
- # dirac (6)
- # emacs (21)
- # figwheel-main (1)
- # fulcro (53)
- # graphql (2)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (21)
- # off-topic (118)
- # onyx (4)
- # pathom (59)
- # pedestal (2)
- # planck (3)
- # reagent (47)
- # reitit (2)
- # shadow-cljs (258)
- # spacemacs (3)
- # sql (10)
- # tools-deps (37)
Nice tool for sequence diagrams: https://sequencediagram.org/ — probably some open source library does the rendering as I’ve seen this language elsewhere — any clues?
Just found this too: https://mermaidjs.github.io
Cool little service related to all that if you want to play with various solutions: https://kroki.io/
http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html?m=1 GVR has been on record for a while as disparaging of functional constructs, so it makes sense that doing things the "Pythonic" way means rejecting them.
brb redoing all of "Data Science from Scratch" in Hy
has anyone played with Clojure and Kotlin together on the JVM? I just discovered Kotlin last night. And I am hooked. I want to use it in combination with Clojure.
I actually called Clojure from Kotlin it's easy, not sure about the other way around, I guess you have the same kind of problems as using Kotlin from Java, https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html
What’s Kotlin’s schtick?
@dharrigan I will read right now. I was sold in the first 10 minutes on Kotlin… When they said it solves null pointers, composition over inheritance, does co-routines and type inferred.
Java Fibers is very similar to Kotlin co-routines
is it fast?
I am going to look at putting Kotlin on Vert.x along side Clojure
You are using a reactive programming model?
no event loop similar to node js? for IoT?
based on web sockets
that’s what I want to find out about Kotlin… it sounds like it does async (event loop style) but with multi threading… so it’s the best of both
start simple, get it working, then if there are issues, look to solve. No need to throw in an alphabet soup of tech just because you can.
I am moving my stack off Rails onto JVM
You'd be suprised how a basic (functional) stack works without throwing in a lot of tech
has electronics or hardware experience helped you in the IoT? hacking on arduino or raspberry pi?
Nope. Being able to understand basic binary operations mostly. We work with a variety of IoT devices, each of them talk to us over various networks, so decoding packet data (from specifications) is all you need mostly
is the JVM helping by virtualizing your code on the different devices?
we have hundreds of microservices consuming from data being ingested via streams from these IoT devices.
Ok, then you must be using Spark or Storm?
you just collect the real time data directly into Kotlin?
no message broker que?
ahh ok, apache product… nice
I am getting ready to build a real time data pipeline from a chat system
I can’t say I know enough… to compare Kafka, Storm and Spark
actually, I first started by looking at Golang but then changed my mind about it for this use case
Start simple, try kafka, then determine based upon your observed outcomes whether you need to add in more pieces, like storm/spark and all that entails.
ok… sounds good. I will try Kafka for the first data pipeline
If you can get messages streaming into kafka, and your downstream consumers reading those messages in a scaleable way, then you determine whether it's fit-for-purpose 🙂
ya, I probably can use Clojure for the data side. And Kotlin for the web stuff.
you might want to try an experiment of doing a parallel coding exercise between clojure and kotlin for the same problem and see which one you like
ok, I will do that
because Rails is too slow for web sockets
I’d be curious to see what the tradeoffs are between kotlin and clojure, assuming you have some level of mastery of both.
do you have any ideas for testing the trade offs?
Informally, I’d aver that clojure is aimed squarely at folk implementing systems that manage data, with good stories to tell around handling concurrency. It could be said to trade away some performance in that pursuit, and has a higher learning curve for most folk. The story I’ve heard around kotlin is mostly “java but better” but I suspect that’s giving it short shrift, so I’d be curious to hear the perspective of folk actually using it, esp. if they also use clojure.
I use Clojure for scraping web pages. I like it because it is succint. I am very new to Clojure though. I know it shines in the data world.
I think Kotlin comes from a very pragmatic "middle-way" approach that doesn't go to extremes (such as Scala) or verboseness (Java). It was designed to get the job done, easily, succiently and with the mimimal of learning curve for java programmers
We find it easy to write very terse, easy-to-follow programs that are also easy to test and maintain and (re)training java developers to use kotlin was very painless. Everyone had abandoned java (given the choice) after a couple of days of working on kotlin
Liberies like Lombok offer some of the same things to Java, but because it's not first class it's not working as well. While Kotlin is a bit more functional then Java it's way more oo then Clojure. I would choose Clojure over Kotlin myself. But if I would choose for a team of Java developers it would probably be better to go with Kotlin
Ya, I still love Clojure. I do like a few things about Kotlin… built in the null object pattern, composition over inheritance, async but with procedural style code (no callback hell)
About the null safety, I had the same implementation in Clojure and Kotlin. But when switching to Kotlin the program crashed because there where null's in the database. Some issue arises with interop. In that respect I much rather like the Clojure approach of almost always returning nil when called on null/nil. But not always since (read-string nil)
does throw an error. Seems like only an advanced type system like with Haskell or Rust can really safe you here.
I wrote a null object pattern in Ruby. I wonder if I will need that pattern in Clojure. It’s usually useful in places like a view template… so an error isn’t thrown when data is nil/null
@donaldball any ideas for testing both?
I’ve just been writing simple algorithms and speed testing different languages
let’s thread this… and not take up the whole channel
is anyone using the screen share tool inside VS Code?
I could use a bit of git help. Currently there’s some code that was added to a module written 2 years ago, however I’ve updated the module since. What’s the best way to pull in changes from specific files written 2 years ago without losing the changes made more recently?
First make sure all changes also are on remote branches. Then you could either rebase or merge (locally). Once your sure it's working and contains both changes push.
https://stackoverflow.com/questions/449541/how-to-selectively-merge-or-pick-changes-from-another-branch-in-git just found this, which also suggests a rebase
git cherry pick might help too. it helps you only merge specific files, 1 at a time.
I’d make sure to create a new branch just to do the rebase or cherry pick… in case it goes wrong
Ah yeah, was thinking about git cherry pick. Unfortunately there’s a bunch of commits but only some have files I want. But yes, I’ll create a copy of the branch so I can try out these methods first.
ya, just using git diff to find the changes… if it’s only 1 file, you could even cut-n-paste
make sure you create a branch just to do the merging
git is usually 99% safe… only time I ever lost work was when I used -f to over ride something
rebasing can be a little dangerous too, because it can rewrite your history
As long as the branch your rebasing already exists remote, and you only push after your confident it works you should be safe.
pretty much, the only rebase that I use quite often is that
git squash
that condenses several commits into 1I rebase all the time
I just have some pristine copy of my code somewhere on my FS
just in case :’)
I rebase as much as my team members allow me to, which basically means just the feature branches only I work on.
yeah that makes sense. Also, rebasing isn’t perfect for “catching up”.
I really would like to rebase more but that's only possible if we would all work on our own forks, an then rebase on the origin's fork.
wasnt it you @U09LZR36F ,that linked the git flow used by git itself?
Ah yeah, here: https://hackernoon.com/how-the-creators-of-git-do-branches-e6fcc57270fb
I had created a new branch off the latest stable branch. Ran git checkout <branch> <paths>
from the older experiment, then looked at the diff and realized I would be loosing changes if I committed this.
are you running unit tests?
I ask because… are the changes something incremental that you can test in steps… or is it 1 giant refactor of some code
We do have a fair amount of unit tests, and a QA person to run through smoke tests, but the testing situation is not as strong as I’d like.
http://cl.ly/c920fac5937c so that’s the situation. I want to pull a few files from the old branch into the new branch without loosing the changes in the stable branch that have happened since.
After some research it sounds like I should make a copy of the old branch, use git reset --soft <first commit before old branch>
and get rid of all the files I don’t care about. Then do a git rebase -i stable
to squash\drop commits to get the latest stable in there. Then do a git diff stable^..<old-copy> <files> | git apply
to patch the new branch with those updated files.