Fork me on GitHub
#boot
<
2015-09-20
>
onetom01:09:18

@mynomoto: micha: we r not using multiple page builds because it's O(n) slow, but instead copy the same compilation result under different subdirectories

juhoteperi09:09:01

I believe for multiple pages Closure modules should be used instead

juhoteperi09:09:22

Doesn't make sense to serve same cljs.core and library code again for each page

juhoteperi10:09:43

@martinklepsch: What if you add another newline?

juhoteperi10:09:47

Github works the same way? You need two line-breaks to start a new paragraphg

martinklepsch10:09:04

It’s not about whether its part of the blockquote or not (it should be)

juhoteperi10:09:36

What's the problem then?

juhoteperi10:09:47

oh author is outside of cite

martinklepsch10:09:49

the issue is that “author is not inside the <cite> tag

juhoteperi10:09:11

A moment, I'll check if the problem is in pegdown output or endophile conversion

juhoteperi10:09:28

[#<TextNode TextNode [2-17] 'blockquotetext '> #<InlineHtmlNode InlineHtmlNode [17-23] '<cite>'> #<TextNode TextNode [23-29] 'author'> #<InlineHtmlNode InlineHtmlNode [29-36] '</cite>'>]

juhoteperi10:09:35

Pegdown output looks correct

juhoteperi10:09:24

InlineHtmlNodes just arent't converted correctly by endophile

juhoteperi10:09:05

Ugh, it looks quite hard. We should find all inline html nodes and then try to find corresponding end nodes which might not exist and then wrap stuff between them inside the htmle lement

juhoteperi10:09:05

Or perhaps pegdown should output it as HtmlBlockNode

martinklepsch10:09:22

how do you get to that pegdown ast output? I couldn’t figure out how to do that yesterday

juhoteperi10:09:00

by calling only mp

martinklepsch10:09:34

@juhoteperi: and then? this only returns something like #<RootNode RootNode [0-196]> for me

juhoteperi10:09:44

.getChildren

martinklepsch10:09:49

ahh! great, thanks.

juhoteperi10:09:47

clj
(.getChildren (first (.getChildren (first (.getChildren (mp "A paragraph with <a href=\"example.org\">inline html</a>"))))))
  [#<TextNode TextNode [0-17] 'A paragraph with '> #<InlineHtmlNode InlineHtmlNode [17-39] '<a href="example.org">'> #<TextNode TextNode [39-50] 'inline html'> #<InlineHtmlNode InlineHtmlNode [50-54] '</a>'>]

juhoteperi10:09:11

I'm sure that should at least work

martinklepsch10:09:10

@juhoteperi: wouldn’t it be easier for endophile to just take pegown’s html and convert it to hiccup instead of going ast>html?

juhoteperi10:09:00

Nut sure, but we would have lot less control and it would be slower

martinklepsch10:09:02

@juhoteperi: in pegdown tests there is this nice tree visualization of the ast but didn’t yet bother checking how they get that

juhoteperi10:09:08

@martinklepsch: When running the tests?

martinklepsch10:09:32

@juhoteperi: yes, but also the .ast files that are used to define the tests

juhoteperi12:09:56

It works but there must be a simpler way

martinklepsch13:09:28

@micha: your boot maintenance day is over but maybe merging one of the bootlaces PRs would we good anyways? https://github.com/adzerk-oss/bootlaces/pull/7

martinklepsch13:09:37

@juhoteperi: maybe for the case of perun it’d make sense to just use pegdown’s html transform?

juhoteperi13:09:11

Hmh that makes sense

martinklepsch13:09:19

@juhoteperi: https://github.com/hashobject/perun/pull/54 — just copied the extension handling from endophile

juhoteperi13:09:08

Yeah that's probably good until we can get endophile updated

juhoteperi13:09:47

@martinklepsch: Though that extensions map is missing new extensions

martinklepsch13:09:24

@juhoteperi: I’m thinking for perun it would make sense not to use endophile in general no?

juhoteperi13:09:34

Not sure yet

martinklepsch13:09:14

endophile makes sense when you want hiccup or data.xml like stuff but as long as you only want html strings I don’t see a reason to use it

juhoteperi13:09:15

I was thinking of walking the enlive/hiccup data and hyphenating that

juhoteperi13:09:35

But perhaps I can walk through Pegdown AST

juhoteperi13:09:42

Could be easier even

martinklepsch13:09:06

@juhoteperi: using the plain string as input wouldn’t work?

juhoteperi13:09:19

string with html elements? no

juhoteperi13:09:48

not sure about hyphenating the markdown text

juhoteperi13:09:58

Would probably break e.g. html tags

juhoteperi13:09:54

I should also look into Pegdown plugins

juhoteperi16:09:26

Should compile work with boot?

juhoteperi16:09:47

*compile-path* seems to be set to "classes"

micha16:09:09

@juhoteperi: the aot task uses it

juhoteperi16:09:40

it creates tmpdir and sets compile-path to it

juhoteperi16:09:44

but it doesn't work in repl

micha16:09:36

(boot (aot)) in repl doesn't work?

juhoteperi16:09:54

(compile 'something)

micha16:09:12

oh, you probably have to bind the compile path to something

juhoteperi16:09:21

repl task should probably do that

mynomoto17:09:24

!m deraen. I'm trying vim-cider, it's amazing!

mynomoto17:09:04

@juhoteperi: is there a way to configure vim-cider to not use prefix forms on clean-ns?

juhoteperi17:09:30

@mynomoto: let g:refactor_nrepl_options = "{:prefix-rewriting false}" I think

mynomoto17:09:39

@juhoteperi: is a PR to add the new additions to the readme welcome or you want to change some keybinding before making that public?

juhoteperi17:09:12

Hmh yeah I think clean ns and find symbol bindings should be changed

juhoteperi17:09:17

or default bindings removed

flyboarder19:09:32

how does :scope work in boot deps?

martinklepsch20:09:32

@flyboarder: same as in leiningen

martinklepsch20:09:44

@flyboarder: what specifically are you wondering about?

davy20:09:14

Hi @martinklepsch, I am trying to create a cljsjs package following the instructions in https://github.com/cljsjs/packages/wiki/Creating-Packages . At point 7, I want to require my .jar in my ClojureScript project in order to check that everything is going well. I tried with :resource-paths in the project.clj without success.

martinklepsch20:09:33

@davy: you need to add the coordinates that are in the Readme.md to the list of :dependencies

flyboarder20:09:51

@martinklepsch: yeah i thought so but I could seem to get google to find the docs for that 😛, kinda went straight to boot and skipped lein XD

davy20:09:24

@martinklepsch: thanks, I will give it a try!

micha20:09:34

:scope isn't exactly the same in boot because some things in there are for specific Maven tasks etc

micha20:09:22

basically you use :scope to control how transitive dependencies will be resolved when someone uses a package you make

flyboarder20:09:51

ah I see so it's not directly related to either prod/dev like dependency management apps

micha20:09:49

the :scope is simply added to the pom.xml when you create that

micha20:09:56

nothing else cares about it

micha20:09:22

so if you are going to make a library that you package as a jar and distribute via clojars or maven central, you will need a pom.xml file in there

micha20:09:32

which boot can make for you with the pom task

flyboarder20:09:51

right so boot doesnt use it at all for actual task running

micha20:09:05

the pom.xml file is how the maven machinery knows how to download the dependencies of dependencies basically

micha20:09:24

so annotations in the pom.xml can tell clients that some of the dependencies were only needed at build time

micha20:09:33

like when you were hacking on the library and building the jar

micha20:09:55

but some of those dependencies might not be needed when someone is just using your library

micha20:09:24

yeah boot doesn't care about it

micha20:09:04

boot does pay attention to scopes when it does things like create uberjars

micha20:09:06

for example

micha20:09:17

scope test things don't go into an uberjar usually

micha20:09:38

uberjar is a weird case though because it's sort of a hack

flyboarder20:09:45

do the test scope items get put into the usual build-jar?

micha20:09:03

well jars normally don't contain anything but your code

micha20:09:09

dependencies are in their own jars of course

micha20:09:31

it's the pom.xml that you stick in the jar to tell clients that your jar depends on other jars

flyboarder20:09:53

so those are only stuck together in the uberjar

flyboarder20:09:59

which makes sense

micha20:09:06

yeah and uberjar isn't a real thing in java

micha20:09:17

people just found various ways to hack something together

micha20:09:39

and the various approaches all have their own advantages and disadvantages

micha20:09:53

basically things in different jar files can conflict

davy20:09:41

@martinklepsch: works like a charm!