proton

https://github.com/dvcrn/proton
2016-02-15T00:02:19.000012Z

:thumbsup:

dvcrn 2016-02-15T02:05:50.000013Z

@jessejanderson: I'm trying to merge your pane PR but it doesn't even compile for me

dvcrn 2016-02-15T02:07:16.000014Z

I'll take a closer look later but if you're faster than me, please let me know

dvcrn 2016-02-15T02:15:27.000017Z

theme comparison. material+material-dark vs nucleus+atom-fusion

2016-02-15T03:15:09.000019Z

wow

2016-02-15T03:15:31.000020Z

proton handles handlebars beautifying better than spacemacs

2016-02-15T03:51:32.000021Z

@dvcrn: can the errors only show for the given buffer?

dvcrn 2016-02-15T04:11:35.000022Z

@robbyoconnor: need to check that!

dvcrn 2016-02-15T04:13:05.000023Z

yes there is

dvcrn 2016-02-15T04:13:27.000024Z

[linter.statusIconScope "File"] should do that. Gonna put that as default for the next release

2016-02-15T04:14:53.000025Z

It's not a biggy

dvcrn 2016-02-15T04:21:36.000026Z

it also annoyed me. Just never got around to check it

2016-02-15T04:32:00.000027Z

Question: what does it use for beautification?

dvcrn 2016-02-15T04:36:07.000028Z

we started adding https://atom.io/packages/atom-beautify but not sure no the exact state

dvcrn 2016-02-15T04:36:11.000030Z

I think @geksilla started with it

dvcrn 2016-02-15T04:36:42.000032Z

and stuff that isn't supported by it, we just add whatever is available

dvcrn 2016-02-15T04:37:03.000034Z

(ruby is for example done with rubocop format)

2016-02-15T05:00:26.000035Z

I use rubocop to format my ruby

2016-02-15T06:14:55.000036Z

just updated my proton install

geksilla 2016-02-15T09:09:24.000037Z

@dvcrn I would like to set default theme nucleus + atom-material-syntax.

geksilla 2016-02-15T09:10:08.000038Z

nucleus is the one of the best themes, because it's adaptive and looks awesome with any syntax theme.

geksilla 2016-02-15T09:10:33.000039Z

also we can pre set some default profiles with theme-switch

geksilla 2016-02-15T09:11:10.000040Z

btw fusion theme also awesome )

dvcrn 2016-02-15T09:35:14.000041Z

@geksilla: I think we should integrate your surround keymap by default

geksilla 2016-02-15T09:46:13.000042Z

ok

geksilla 2016-02-15T09:47:25.000043Z

I will send PR. @robbyoconnor did you start to wok on it?

2016-02-15T09:50:48.000044Z

work on what?

2016-02-15T09:51:13.000045Z

@geksilla: I gave up -- i pulled your keymap and keybindings in

geksilla 2016-02-15T09:52:04.000046Z

ok, thought you want to send PR. I will add it.

geksilla 2016-02-15T09:52:37.000047Z

for vim-mode we can use vim-surround package. https://atom.io/packages/vim-surround

2016-02-15T09:56:13.000049Z

I dont wanna send a PR -- I'm already spread thin with OSS

2016-02-15T09:56:21.000050Z

contributions

geksilla 2016-02-15T10:08:58.000051Z

sent PR regarding surround support.

2016-02-15T11:31:05.000052Z

How does it work for vim-mode

2016-02-15T11:31:13.000053Z

as far as I can see that works for vim-mode-plus only... :X

geksilla 2016-02-15T11:40:28.000057Z

@robbyoconnor, vim-mode-plus enabled by default and has built in support for surround

geksilla 2016-02-15T11:41:00.000058Z

vim-mode is developed by atom core team and has no support for surround

geksilla 2016-02-15T11:41:34.000059Z

for vim-mode there is a plugin https://atom.io/packages/vim-surround

geksilla 2016-02-15T11:42:32.000061Z

so for vim-mode-plus we need to add appropriate key maps to trigger surround actions

geksilla 2016-02-15T11:42:52.000062Z

but for vim-mode package we need to install additional package vim-surround

2016-02-15T11:43:04.000063Z

ah ok

2016-02-15T11:43:07.000064Z

❤️

2016-02-15T11:45:50.000065Z

to me the power of vim is the fact i can copy/paste without using my mouse

👍 1
2016-02-15T11:49:30.000066Z

I'm not interested in an editor war -- so long as I have modal editing im happy

geksilla 2016-02-15T13:59:58.000067Z

cute plugin https://atom.io/packages/git-time-machine

dvcrn 2016-02-15T14:00:33.000069Z

spacemacs had something like that in the minibuffer

geksilla 2016-02-15T14:00:33.000070Z

we need this! https://atom.io/packages/nyancat

dvcrn 2016-02-15T14:00:39.000072Z

lol

geksilla 2016-02-15T14:00:57.000073Z

I had this plugin enabled for spacemacs )

dvcrn 2016-02-15T14:01:23.000074Z

We need more fun layers 😄

dvcrn 2016-02-15T14:01:25.000075Z

https://atom.io/packages/typewriter-sounds

dvcrn 2016-02-15T14:01:34.000077Z

That was my favorite

geksilla 2016-02-15T14:01:40.000078Z

nice, will try it

dvcrn 2016-02-15T14:02:00.000079Z

sadly doesn’t work that great with vim mode

geksilla 2016-02-15T14:02:08.000080Z

hm

dvcrn 2016-02-15T14:02:16.000081Z

seems like people really like “spaceatom"

dvcrn 2016-02-15T14:03:13.000082Z

typewriter + power-mode + nyan-cat and my coworkers will never take me serious again lol

geksilla 2016-02-15T14:03:43.000083Z

))))))))))))

geksilla 2016-02-15T14:06:30.000084Z

@dvcrn what is the status of doc_helper branch?

geksilla 2016-02-15T14:07:50.000085Z

just wondering what features missed

dvcrn 2016-02-15T14:08:18.000087Z

putting everything together and writing it into a README file

dvcrn 2016-02-15T14:09:21.000088Z

need to think how to run it properly. We can’t use shadow-build or leiningen (ping @thheller) to collect all the things because of cljs artifacts. I think it would fail right away. I saw that better cljs repl support is coming in the next version though

dvcrn 2016-02-15T14:09:35.000089Z

alternatively, maybe planck for mac can help us with 1-time off scripts (for generation)

geksilla 2016-02-15T14:15:30.000091Z

For now we can try to use it for key bindings discovery.

geksilla 2016-02-15T14:16:23.000092Z

Similar to spacemacs when you can hit Ctrl-h during which-key buffer

geksilla 2016-02-15T14:17:16.000093Z

For layer and other docs we can just copy all readme files to some directory for released build

geksilla 2016-02-15T14:19:16.000094Z

For example you type SPC h l will start dialog with list of available layers

geksilla 2016-02-15T14:19:46.000095Z

on selected item will open appropriate readme

2016-02-15T14:48:35.000096Z

nyancat needs to go in the colors

2016-02-15T14:48:39.000097Z

let's model spacemacs

2016-02-15T14:48:40.000098Z

:simple_smile:

2016-02-15T14:48:47.000099Z

They're doing stuff right

👍 1
2016-02-15T15:07:26.000100Z

We should slowly aim to match the layers of spacemacs

dvcrn 2016-02-15T15:08:36.000101Z

nyan cat isn’t really a color tho 😛

dvcrn 2016-02-15T15:08:52.000102Z

it’s a fun package that’s toggle-able. It seems obvious to me where to put it 😉

dvcrn 2016-02-15T15:09:16.000103Z

layer -> fun/nyan-cat keybinding -> SPC t f n (toggle -> fun -> nyan cat)

thheller 2016-02-15T15:10:25.000104Z

@dvcrn: what's up?

dvcrn 2016-02-15T15:10:52.000105Z

@thheller sooo

dvcrn 2016-02-15T15:11:53.000107Z

each layer is exposing keybindings and readme fragments over multimethods. Within proton / cljs we just collect that and generate the prefix tree with that. Now we want to use that information to generate README files. We need a solution to execute all of the cljs code and writes out files

dvcrn 2016-02-15T15:12:32.000108Z

any thoughts on this? I was thinking of just compiling everything down to javascript and load it inside node with calling it’s exposed commonjs functions

thheller 2016-02-15T15:12:49.000109Z

uhm I don't quite follow

thheller 2016-02-15T15:13:05.000110Z

you have a bunch of cljs CODE that you want as data?

thheller 2016-02-15T15:13:24.000111Z

do you have an example?

dvcrn 2016-02-15T15:13:42.000112Z

each layer’s multimethod is returning a hash (or vector of vectors) that defines the keybindings and settings each layer needs to operate

dvcrn 2016-02-15T15:13:55.000113Z

that information is what we show inside READMEs as well but right now that’s very manual

dvcrn 2016-02-15T15:14:37.000114Z

the part where I was wondering if you have some ideas is how to execute a one off cljs runner that just calls all these multimethods, collects each layers settings and writes out a bunch of README files

dvcrn 2016-02-15T15:14:52.000115Z

is there a way to do this with shadow-build or is the node / browser REPL the only real way to achieving this?

thheller 2016-02-15T15:15:05.000116Z

again I don't quite follow

thheller 2016-02-15T15:15:20.000117Z

where can I find one of those multi-methods?

dvcrn 2016-02-15T15:15:40.000118Z

sec

dvcrn 2016-02-15T15:17:14.000121Z

or here for required settings https://github.com/dvcrn/proton/blob/master/src/cljs/proton/layers/lang/ruby/core.cljs#L10-L12

dvcrn 2016-02-15T15:17:57.000125Z

and this is how a readme looks like https://github.com/dvcrn/proton/tree/master/src/cljs/proton/layers/lang/ruby

thheller 2016-02-15T15:18:02.000127Z

why are those not actual "config" files?

dvcrn 2016-02-15T15:18:12.000129Z

nope, pure cljs trees :simple_smile:

2016-02-15T15:19:01.000130Z

@thheller: you never saw spacemacs? The fact this is done in clojurescript is kinda epic 😄

2016-02-15T15:19:14.000131Z

😄

thheller 2016-02-15T15:19:36.000132Z

again: why is it code?

thheller 2016-02-15T15:19:55.000133Z

it would be the exact same structure if it was edn?

2016-02-15T15:20:20.000134Z

@thheller: why not?

2016-02-15T15:20:33.000135Z

Sometimes there's logic that needs to be run

dvcrn 2016-02-15T15:20:34.000136Z

sometimes we need to react on user config and dynamically adjust packages / settings/ etc

dvcrn 2016-02-15T15:20:37.000137Z

yah

thheller 2016-02-15T15:20:41.000138Z

that is not logic that runs

thheller 2016-02-15T15:20:45.000139Z

that is static data

thheller 2016-02-15T15:21:18.000140Z

just trying to understand it, not saying it is wrong or anything

dvcrn 2016-02-15T15:21:26.000141Z

aaanyway

dvcrn 2016-02-15T15:21:37.000142Z

the part we want to do next is to collect all of that and spit out readmes for each layer

dvcrn 2016-02-15T15:21:50.000143Z

though my cljs knowledge is still a bit limited in what the best way for this is

2016-02-15T15:22:20.000145Z

I bullshitted my elisp for the past 6 months

thheller 2016-02-15T15:24:01.000146Z

suppose you have a config file like this

thheller 2016-02-15T15:24:01.000147Z

https://gist.github.com/thheller/594357dbae686e01f1c9

thheller 2016-02-15T15:24:09.000148Z

wouldn't that yield the same thing?

thheller 2016-02-15T15:24:21.000149Z

but since its pure data, not code

thheller 2016-02-15T15:24:35.000151Z

you can access it simply without executing it?

thheller 2016-02-15T15:24:51.000152Z

you can even write a simple shadow-build importer

thheller 2016-02-15T15:24:58.000153Z

that generates the desired code from it

thheller 2016-02-15T15:25:03.000154Z

if it really has to be code?

thheller 2016-02-15T15:25:37.000155Z

but .. if you are fixed on the idea of code

thheller 2016-02-15T15:26:07.000156Z

yes you can use shadow-build to generate a launcher/util for you and node to execute it

dvcrn 2016-02-15T15:26:13.000157Z

I’m not sure how edn deals with anonymous nested functions, for example https://github.com/dvcrn/proton/blob/master/src/cljs/proton/layers/core/keybindings.cljs#L93-L104

thheller 2016-02-15T15:26:15.000159Z

same thing just a whole lot more complicated

thheller 2016-02-15T15:26:47.000161Z

don't make it an anonymous function

thheller 2016-02-15T15:27:01.000162Z

big smell if you repeat something like that 4 times

thheller 2016-02-15T15:27:22.000163Z

:target that-package.util/helper-fn

dvcrn 2016-02-15T15:27:31.000164Z

yah 😅 we started doing that for other things

dvcrn 2016-02-15T15:27:38.000165Z

in anyway, how would that look in edn?

thheller 2016-02-15T15:27:45.000166Z

it wouldn't

dvcrn 2016-02-15T15:27:49.000167Z

if I parse the edn file, does it resolve to the namespaces?

dvcrn 2016-02-15T15:27:50.000168Z

ah

geksilla 2016-02-15T15:28:04.000169Z

I think it will be simple list in edn

thheller 2016-02-15T15:28:13.000170Z

well yeah if would be a simple list

thheller 2016-02-15T15:28:55.000171Z

but not very useable and you would need to load configs via macros so the correct cljs code can be generated

thheller 2016-02-15T15:29:03.000172Z

not very pretty

geksilla 2016-02-15T15:31:10.000173Z

I had an idea to use bootstrapped repl to compile some parts, like these functions in edn

geksilla 2016-02-15T15:31:27.000174Z

but really don't know is it make sense at all

geksilla 2016-02-15T15:32:38.000175Z

I was able to compile simple function in bootstrapped cljs repl

geksilla 2016-02-15T15:33:20.000177Z

but didn't try to require that compiled code

thheller 2016-02-15T15:33:29.000178Z

if you want to stick with the code

thheller 2016-02-15T15:33:41.000179Z

write a "main" namespace that does what you want

thheller 2016-02-15T15:33:43.000180Z

compile it

thheller 2016-02-15T15:33:54.000181Z

execute it to dump the data

thheller 2016-02-15T15:34:32.000182Z

I assume you have something like that already?

dvcrn 2016-02-15T15:37:30.000183Z

Like a one off thing that just dumps everything into READMEs and execute that

2016-02-15T15:37:30.000184Z

what is edn

2016-02-15T15:37:34.000185Z

im too lazy to google

dvcrn 2016-02-15T15:38:37.000186Z

@robbyoconnor: clojure is a superset of edn. It's a data notation https://github.com/edn-format/edn

dvcrn 2016-02-15T15:38:50.000188Z

The .proton file for example is pure edn

geksilla 2016-02-15T15:43:42.000189Z

@dvcrn, I'll try to make some demo branch with readme features on top of doc_helper branch.

dvcrn 2016-02-15T15:45:01.000190Z

I think using shadow build to compile a different main namespace and execute that with node might work quite good

dvcrn 2016-02-15T15:45:27.000191Z

Getting late here. I'll check back tomorrow morning :)

geksilla 2016-02-15T15:56:25.000192Z

@thheller I got one issue when trying to write another atom plugin with shadow-build. Thrown error: 'shadow_umd_helper' already provided

geksilla 2016-02-15T15:58:01.000193Z

I think this is because of proton plugin already define it

thheller 2016-02-15T15:59:42.000194Z

you can only have one umd module per build

geksilla 2016-02-15T16:00:17.000195Z

yes, I got it

geksilla 2016-02-15T16:01:01.000196Z

also compiled source with advanced compilation will prevent it I guess

geksilla 2016-02-15T16:01:59.000199Z

since it's mangle strings

thheller 2016-02-15T16:03:21.000200Z

no one mangles strings?

geksilla 2016-02-15T16:04:29.000201Z

yes, proton uses simple optimization for release

geksilla 2016-02-15T16:04:54.000202Z

I was trying switch to advanced but got errors

thheller 2016-02-15T16:05:18.000204Z

yes forget about advanced

thheller 2016-02-15T16:05:24.000205Z

not worth the effort

thheller 2016-02-15T16:06:32.000206Z

you'd need externs for all of atom

thheller 2016-02-15T16:06:38.000207Z

every package you are using

thheller 2016-02-15T16:06:43.000208Z

and node itself

thheller 2016-02-15T16:06:51.000209Z

unlikely that will happen

thheller 2016-02-15T16:55:57.000210Z

@dvcrn: looked into it a bit ... getting an executable for the docs will be quite hard ... something does require("atom") which node doesn't know

dvcrn 2016-02-15T22:45:50.000213Z

Hmm we could stub that dependency