Fork me on GitHub
#off-topic
<
2018-12-03
>
cfleming00:12:14

Is anyone from the Mac world able to tell me where the CoreGraphics dylib is so I can use JNA with it?

dorab01:12:01

On my High Sierra iMac, /System/Library/Frameworks/CoreGraphics.framework/Versions/Current

dorab01:12:52

There seems to be a symlink from .../CoreGraphics.framework/CoreGraphics to Versions/Current/CoreGraphics FWIW.

cfleming02:12:50

@dorab Thanks! Yes, what confused me was that the dylib is just called CoreGraphics and doesn’t have the dylib extension.

cfleming02:12:18

In the end I mashed up some code using JNI rather than JNA anyway.

kulminaator10:12:14

In my experience people get carried away with types and overuse them to solve problems (and create new problems along the way) and hence they eventually get mentally attached to them.

💯 8
Chris12:12:41

@kulminaator I’ve been guilty of that. The idea that if you just lock down your types enough then nothing can go wrong is appealing but hasn’t ever quite worked for me.

orestis13:12:14

TBH, I’d love a type checker in Clojure that would statically catch things like “you’re about to call a function with no such arity”, or “silly rabbit, int doesn’t support java.lang.String. The crux of the deal is that it has to be faster than I can eval the same code in the REPL.

slipset11:12:58

FYI Eastwood catches the arity thingy. When used through Emacs with squiggly-clojure, you get warnings in your editor

Daniel Hines13:12:04

Joker also really good at this as well, and has support in a few editors.

helios13:12:03

@orestis isn't this what an IDE can do? (at least the arity: I have Cursive that tells me such things)

orestis13:12:42

What is an IDE? 😛 I should try out Cursive one of these days. CIDER is unaware of such things, IME so far.

todo13:12:00

afaik, IDE can't do something like: function foo expects first arg to have a int for the :bar key" -- but something like a type system can catch it at compile time, instead of a runtime "trying to add nil" error

mpenet13:12:35

it's a work in progress but the intent is good

todo13:12:44

spectrum aims to statically check specs, .... which requires solving the halting problem

todo13:12:55

there's also 'typed-clojure'

todo13:12:16

none of them worked well in practice, and I went with Kotlin

mpenet13:12:35

well spectrum doesn't aim at full coverage so the goal is achievable

todo13:12:25

well, "empty set" is a valid subset of specs, so it doesn't really say much about what it does; whereas with type systems, however limited, it's very explicit about what it will and will not check

helios13:12:56

@orestis i was never able to get clj-refactor work in a decent way, and that's what made me switch to cursive for clojure. Their refactoring tools (find usages, etc.) has been amazing. I use emacs keybinding and the only thing i miss is that the repl isn't another "pane" 😞

orestis14:12:10

I think there is a distinction between “mechanical” things such as working with files, bytes, numbers, etc etc where a type checker can be of great value and minimal overhead. However if you work with data as maps a lot, I think a type checker will be more trouble than it’s worth. But that’s just my domain, I work with Mongo these days (unfortunately) so you need to aggressively validate at runtime anyway.

todo14:12:49

I think alot of it is domain driven. If you're doing ETL work, types are a hindrance. If you're writing a compiler, OS, or game engine, types are godsend.

todo14:12:19

I really wish someone would design a pair of languages at once, like a (Rust, Clojure) combo -- where the two languages co-evolve, with one focused on static guarantees + performance, and the other on "scripting"; and the central authority ensures that interop between the two is smooth.

helios14:12:12

@todo that is actually a nice idea

schmee14:12:31

and here I am trying to implement something like Pedestal interceptors in Kotlin, spending most of my time wrestling with the type system…

😄 4
drone14:12:18

>I think alot of it is domain driven. If you’re doing ETL work, types are a hindrance. If you’re writing a compiler, OS, or game engine, types are godsend. that’s one reason why core.typed is so exciting

todo15:12:57

@schmee: I never understood Pedestal. Do interceptors correspond to tcp packets, or things that transform tcp packets, or what ?

Jimmy Miller15:12:13

Interceptors are basically just functions that take a map and return a map. You can just think of them like middleware. This page does a fairly good job describing them. http://pedestal.io/reference/interceptors

Alex Miller (Clojure team)15:12:29

they are like ring middleware, split in half (request interceptor stack / response interceptor stack)

Chris Bidler15:12:30

This is a thing I say a lot about types and situated languages: I think my second-favorite language to work in after Clojure is Swift. Swift is very dissimilar from Clojure: it is functional and strongly opinionated about working with immutable data first, but it also has static typing and much ink has been spilled on designing and refining a first-class type and operations on that type just for optionals

Chris Bidler16:12:21

The key difference, to me, is where each language “lives” - in Swift, you are (mostly) working in iOS, and “in iOS” is a very different place to be situated than a JVM sitting in a server OS/container. Every time you interact with Foundation or UIKit, you’re dealing with an API-bounded conversation with, essentially, an Objective-C runtime that is entirely comfortable with handing you either the thing you asked for, or a nil - and expecting you to just send it messages and that’s fine because you can send nil messages in Obj-C.

Chris Bidler16:12:38

so Swift is running in an environment where nearly everything it has to do to actually perform effective work is the boundary with a system that requires validation and a degree of defensive programming, et voila we see a wildly different shape of language arise

Chris Bidler16:12:59

I like the idea of a pair of languages that can operate together, but I wonder if a pair is enough? Are there even more environments for our programs to inhabit that require a third, fourth, nth type of extremophile DNA to build themselves from?

👍 4
Alex Miller (Clojure team)16:12:53

given how hard it is to define and evolve one language, asking for 2 or more seems … harder

manutter5116:12:25

“Job security”

todo16:12:23

@alexmiller: If something like Racket had either a JVM backendc of all of Rust';s backends, it might work -- the set of supported DSLs should keep static-typers and dynamic-typers happyl.

drone17:12:15

@chris_johnson language shape is an interesting point. but lisps are good at supporting different shapes

dpsutton17:12:54

There's also clojure interop with jvm

gklijs18:12:15

In theory with GraalVM you could stitch multiple languages together, not sure about the developer experience, and maintainability though. But maybe in time the ide's get smart enough to understand such code, and with debugging you can go easily from one to the next.

theeternalpulse18:12:45

anyone know of a good git tutorial for a less than trivial rebase merge? Something interactive that would take you through the 80% use case of rebase?

theeternalpulse18:12:38

preferrably interactive tutorial to have something for my team as rebase is going to be mandatory and I don't think it's clear to everyone how to do it

gklijs18:12:48

@theeternalpulse How are you going to handle multiple people working on the same branch, working in forked branches? I would really like my team to rebase more, but most still find it scary..

theeternalpulse18:12:30

well the need for rebase has already caused friction, but the idea is that you simply rebase on master whenever you merge, then ??? then everything's great?

theeternalpulse18:12:51

but I know from my experience when magit defaulted to rebase I had no idea what was going on

theeternalpulse18:12:55

but we have that scenario now, and it's kind of a requirement now to rebase so our deployment process can squash them and we have one of those theoretical clean histories i've never seen in a multi-team project

futuro19:12:30

This doesn't answer your question, but we've actually moved away from mandating squashing and rebasing commits, instead using --first-parent to the various commit DAG commands to get a clean view of the history.

gklijs19:12:48

no, never rebase on master, I meant for feature brenches

hiredman19:12:00

squashing is the worst

futuro19:12:15

so git log --oneline --decorate --graph --topo-order --first-parent

hiredman19:12:51

linear history is a lie, (almost)never rebase, always merge

theeternalpulse19:12:19

this is a, "I know it, you know it, but the people that tell us how the project should run told us to do it" situation sadly

theeternalpulse19:12:40

Not to mention having to force push due to incompatible changes on the upstream branch

theeternalpulse19:12:50

I don't like rebase at all

Shay19:12:22

mjd posts on git (and his workflow) are very good https://blog.plover.com/prog/git-habits.html

hiredman19:12:27

do you have rerere enabled? it can help a lot if you end up with a rebase heavy workflow

theeternalpulse19:12:37

never heard of that, let me look into it

hiredman19:12:24

it saves resolutions to conflicts so if you ever encounter a particular conflict again it can automatically resolve it

hiredman19:12:49

at one point a company I worked at had a workflow based on squash merges and cherry-picking, rerere made in slightly less terrible

theeternalpulse19:12:40

cool, I've shared it and will look into it

sova-soars-the-sora19:12:22

"up" looks like "dn" upside-down

🏆 4
🤯 4
futuro20:12:55

I've also found squashing commits before rebasing can help if you hit conflicts, since it'll be a single set of conflicts to fix, and against the latest state of the code base.

☝️ 4
futuro20:12:26

On the downside you have to give up your git history before the official merge point, so that's a tradeoff

fellshard21:12:51

I like the storytelling for a PR that individual commits can give, when correctly staged (as mjd noted), so I'm reluctant to squash at the PR level, though squash-and-merge seems like it's reasonable at that point

fellshard21:12:17

Then you have a verbose, comprehensible review followed by clean history

jaide23:12:07

Anyone at the NYC clojure\lisp meetup tonight?

jaide23:12:03

About to head there myself. I’ll be the socially awkward dude in a stupid hat 😆

😂 4
Eric Ervin02:12:25

awwww. If I'd read this earlier, I'd have gone and been the socially awkward dude in a stupid sweater. (See image to left)

jaide02:12:06

Haha it’s cool I talked to a few clojurists, a general lisp person, and a f# guy. That sweater is a fantastic conversation starter though!