Fork me on GitHub
#boot
<
2016-02-06
>
dviramontes00:02:28

oh wow, thats fancy

dviramontes00:02:14

it worked with: boot production build target i guess i misunderstood the part about passing in the target thanks @micha !!!

micha00:02:53

:+1: great!

juhoteperi13:02:59

@ragge: Did you package Boot for NixOS? The package could use an update.

juhoteperi13:02:15

Oh, the new package is maybe available but it only available in NixOS unstable or something

dominicm17:02:28

Does anybody know why "boot repl -cp 5700" is trying to delete my target directory? It's root owned (docker)

micha17:02:48

do you have BOOT_EMIT_TARGET=no set?

micha17:02:02

that's one of the reasons for making the target task explicit

dominicm17:02:17

Probably not. I'm still trying to wrap my head around the target changes.

micha17:02:27

it's hard for boot to know when you want it to write to the target dir or not when it's implicit

micha17:02:41

and it's unmanaged shared mutable state in there, so that's not good

dominicm17:02:58

Yeah, I understand. Filesets probably don't get nice immutability- yeah.

micha17:02:34

it does some naive checking whether any new files were created to put in the target dir, and it won't write in there if there are none

micha17:02:41

but that backfires in other situations

micha17:02:59

so the explicit target task is much simpler and easier to know what it's going to do

micha17:02:13

is anyone here a guile expert by any chance?

micha17:02:27

i'm looking for a clojure->guile cookbook type of document

micha17:02:38

trying to port a small clojure program to guile scheme

pandeiro17:02:00

@micha if memory serves, Andy Wingo (guile maintainer) was on freenode, I think I remember seeing him in #C099W16KZ or elsewhere

dominicm17:02:28

@micha I agree. So in the future will BOOT_EMIT_TARGET=no be default?

laforge4917:02:31

It is already the default in boot 2.6.0-SNAPSHOT

dominicm17:02:23

I'm quite a fan of just breaking stuff and telling people that the current system doesn't work

micha17:02:34

@laforge49: that's not exactly correct simple_smile

micha17:02:48

we won't make any breaking changes until version 3.0.0

micha18:02:09

the environment variable gives users warning that the behavior is deprecated

micha18:02:14

but people have automated builds that might be pulling the latest version of boot, so we don't want to make breaking changes

micha18:02:34

although for an automated build i would definitely recommend pinning the boot version with a boot.properties file in the project

dominicm18:02:15

Alwaaays pin versions.

micha18:02:12

binds a value, evaluates the body for side effects, and returns the value

laforge4918:02:50

I stand corrected. In boot 2.6.0-SNAPSHOT, only the warning has been disabled. OK @micha ? You can see why I was confused. simple_smile

pandeiro18:02:08

yeah I read the implementation, but given that it's just binding url to a string, then doing an info print -- why not use let?

pandeiro18:02:19

is there something I'm missing there?

micha18:02:32

you want to return the string

pandeiro18:02:24

(let [url (format ...)] (util/info "...") url)) would be the same thing then?

pandeiro18:02:40

I didn't get the part with with-open and resource in this case

pandeiro18:02:46

How is that relevant, or is it?

pandeiro18:02:59

(`with-open` is mention in the with-let docstring)

micha18:02:16

that would be the same, putting the url at the end so it gets returned

micha18:02:32

i don't like that because then the shape of the code is not a rhombus

micha18:02:49

i have a stencil on my desk that i use for Quality Assurance during code reviews

pandeiro18:02:56

interesting criteria

pandeiro18:02:03

definitely valid

pandeiro18:02:11

"shapely code"

micha18:02:14

(with-let [v (compute something)]
  (do-a-thing! for-side-effects)
  (do-another-thing!
    [with some more options]
    [and {:even more :options here}]))

micha18:02:21

look how nice and rhomboid that is

pandeiro18:02:38

and implicit as hell simple_smile

micha18:02:48

(let [v (compute something)]
  (do-a-thing! for-side-effects)
  (do-another-thing!
    [with some more options]
    [and {:even more :options here}])
  v)

micha18:02:56

now look at that disaster

pandeiro18:02:01

ah so obvious, I LOVE IT

pandeiro18:02:23

now I see though why doto is mentioned in the docstring

pandeiro18:02:30

that one works kind of like that too

dominicm18:02:30

I just got the rhombus reference.

micha18:02:54

haha i'm only half joking

micha18:02:11

i have a weird ocd thing maybe

micha18:02:29

the little v at the end irritates me

pandeiro18:02:58

it's your code, you've earned the freedom from annoying vs... but in this case it was pretty non-obvious to me what was going on

pandeiro18:02:24

I got confused because of the with-open part really, the implicit returned val is fine

micha18:02:59

it's like with-open because it binds the value lexically in the body

pandeiro18:02:31

so let is like with-open too?

micha18:02:49

ah yeah i see what you mean

micha18:02:16

"It's a cross between doto and let."

pandeiro18:02:47

I see though because I'm guessing with-open returns the file ?

meow18:02:56

bringing code asthetics to new heights FTW

meow18:02:06

I love it

micha18:02:39

the rhombus is a harmonious shape

micha18:02:56

balanced and compact

micha18:02:08

soothing, even

micha18:02:36

maybe the paralellogram is the highest form

micha18:02:46

but that's too demanding

pandeiro18:02:30

@micha with-open docstring suggestion: "Just like let, but only allows for one binding and returns that binding's value instead of the last expression in body. Useful for executing side effects in the context of a binding whilst producing elegantly rhomboid code." Something like that?

micha18:02:56

how about:

micha18:02:03

> Binds resource to binding, evaluates body for side effects, and returns resource.

richiardiandrea18:02:33

This last is superclear

micha18:02:20

the rhombus is "mas elegante" as they say in miami

pandeiro18:02:10

What is a resource, sorry?

micha18:02:30

the thing you are returning

micha18:02:04

no, it's just the name of the argument

micha18:02:13

the argument to the macro

micha18:02:36

(with-let [binding expr] & body)

Binds the result of expr to binding, evaluates the body for side effects, and
returns the bound value.

pandeiro18:02:52

Cheers, I think expr is clearer IMO

meow18:02:21

the rhombus is on fleek

akiva18:02:34

Trapezoids 4 LYFE

micha18:02:46

trapezoids are highly Artistic, +1

micha18:02:19

achieving bilateral symmetry is difficult

micha18:02:33

but worth the effort

dominicm18:02:03

I buy all my art from trapezoids.

dm318:02:48

so when are we getting a release of boot-clj/rhombus 0.1? simple_smile

micha18:02:58

i need a vi mode for this

dominicm19:02:57

neovim bruh

dominicm19:02:08

It feels lonely in the vim world

micha19:02:44

i tried to like emacs, but after a year i still wasn't really enjoying it so i switched back to vim

micha19:02:59

works fine, no complaints

dominicm19:02:10

I keep crashing emacs, I have no idea how. Even spacemacs.

dominicm19:02:27

I must just have some keybinding in my muscle memory which upsets emacs.

dominicm20:02:22

@micha So, my pod nrepl stuff, I don't seem to be able to get tools.namespace.repl to reload. Is there a reason for that?

dominicm20:02:33

I hadn't, no.

micha20:02:38

that might be the solution

dominicm20:02:38

I didn't even think to check, I'll have a read

micha20:02:06

you just have to tell it which directories are on the classpath, becuase it determines it statically by default

micha20:02:12

and in boot you add them at runtime

dominicm20:02:29

@micha interesting.

dominicm20:02:38

heh, but no get-env in my pod.

micha20:02:00

that's ok, you can use jusr boot.pod/env

micha20:02:06

it's a var, not a function

micha20:02:11

contains the same thing

micha20:02:24

s/jusr/just/

dominicm20:02:40

oh.. I was wondering where that was used

micha20:02:54

that's available in all pods

micha20:02:04

probably refactor things to make that the canoncal source of truth there

micha20:02:22

instead of the duct tape updating thing we do now

micha20:02:30

get-env and set-env! can just operate on that instead

dominicm20:02:03

Yeah, not a bad idea.

alandipert23:02:26

@micha: guile on free node is awesome, some triangle clojure people in there also

micha23:02:55

yeah i got some good leads, i'm almost having a complete program