This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-05
Channels
- # beginners (8)
- # boot (6)
- # cider (9)
- # clojure (43)
- # clojure-art (1)
- # clojure-australia (3)
- # clojure-berlin (1)
- # clojure-japan (4)
- # clojure-russia (13)
- # clojurescript (72)
- # core-matrix (1)
- # cursive (2)
- # datomic (1)
- # events (1)
- # hoplon (312)
- # jobs (1)
- # ldnclj (5)
- # off-topic (52)
- # overtone (2)
- # re-frame (5)
- # reagent (6)
- # testing (1)
I had code of form (body (div ... (let [...] (textarea ...) (div ...))))
which didn't show the textarea. My understanding is the let only returned the last thing, which is the div. So 2 questions really
1) I did [(textarea ...) (div ...)]
, is that ok? I mean that splices the stuff in but not sure if this is idiomatic
2) if the let holds cells, will they live on as the site goes?
sure, vector splicing is idiomatic, and the cells will live on as long as something references them (if nothing references them they'll be collected with the garbage)
I also just noticed that I get nil from cljs repl on .-innerHtml call while I get a non-nil result in chrome console
you want to do someting whenever the contents of the textarea are modified by the user, yes?
the last important part is that showdown has a makeHtml method which returns a string like <h1 id="Hi there">Hi there</h1>
now I need to find out how to dump that in my div, apparently dropping it in as the last argument to div
won't do the trick
this might be something you can use for wiring up inputs to cells: https://gist.github.com/380a072d8b69cbffebd7
forgot that returned a jQuery object, so you need to do aget
to obtain the bare dom element
(div :id "preview" :class "flex-auto col-6" (-> md-parsed js/jQuery (aget 0)))
<- this still shows me text, not DOM elements
btw this is the first time I'm running chrome in years. I'm an FF fan but apparently everyone recommends chrome for development
learning everything at once is sometimes extremely difficult, but it's fun to see some reward like this
I figured this will be a simple enough project to get my feet wet. Just a few finishing more things I want to try and I'll pop it on github if you want to
wanted to try playing with the css to have it horizontal on big screens and vertical on small ones
I think it's a good choice for me for now since it makes working with css quite simple and since the whole thing is just a lot of small classes I can open up the css and check out what's in it
so I can type away and if need arises look into the classes to see what is what exactly
like i'd prefer to have the classes handled for me by some more general abstraction in my code
i just don't know enough to see the big picture and which concerns are orthogonal and which aren't
I understand what you mean, I feel like cheating too when space-joining classes in a string
there must be something simpler that can figure out how to arrange itself given general specifications
well css is the "standard" so anything you build would have to boil down to that, right
the stylesheet language is parsed by the borwser, and the end result is properties of objects being changed
ok, nevertheless my point is still the same, even if it's js object props, you only have those props
I laughed when I saw this - https://github.com/basscss/basscss/blob/master/css/basscss.css#L719
i think a lot of that is because of the general uselessness of false programming languages
interestingly enough the generator of the site generated a css file that only contains the most common one
so they are forever forming committees to decide how the language syntax should be and what primitives they should have
in lisp we just write a function or a macro ourselves and go on about our business 5 minutes later
if they don't provide a way to progam then they need to support every permutation of everything you could ever need, explicitly and individually
where he said the sole developer of js (which he wrote in like 2 weeks) wanted to implement scheme but the higher-ups said "ugh that looks ugly, noone will want to write that. Make something that looks more like java."
I'm still wondering what would the web be like had they let him implement scheme in the browser
i mean he implemented js as an implementation of this highly experimental prototypical inheritance thing
scheme wasn't any weirder than the obscure research project he plundered for ideas on js
it also shows how crucial it is to support macros in a programming language that is expected to be widely deployed and long lived
if js had macros the es6 guys wouldn't need to upgrade every browser in the world to have let
I had a funny path, I studied some programming at school, stuff like C++, Matlab, Mathematica. Then at work I had to pick up VBA. In my spare time I was looking around for other stuff and hit into clojure
that meant 3 months until I "got" lisp, functional programming and laziness, at least the basics so I could solve the first 20 project euler solutions
and then I tried a dozen other languages. python, CL, Haskell, OCaml, Java, JS, Julia, Racket
but overall there is so much less code that you end up saving a lot of parens at the end of the day
you have to write like 20 loc before you start actually coding. And when you come back to the code you cannot see it in the midst of all the boilerplate
the worst part is I use an even worse language at work 😄 I once rewrote a left-leaning red-black tree java implementation to VBA and it was like twice in lines of code
when I dropped 200k things on it it took like 3 seconds to build and 8 for the GC to collect
and a VB program to compute how to load a cargo ship from an excel spreadsheet of the various containers the ship will carry
because the user can preprocess the input and postprocess the output in their own formulas and graphs
we would do things like get an iterative solution to some problem really fast, by just pasting into the worksheet
or like sometimes you can get an answer if you have some invariant, where leftside - rightside = 0
what I meant is you can't type somewhere stuff like "copy the data where column C says "Y" to a new worksheet" or "filter to records that meet this and that"
you could scrape up a small project where the UI would be a grid of cells that would look like a spreadsheet and work with javelin as the backend
and instead of needing to go into VB land to make functions, you can just put a function in an input cell
I'd totally use that, except that it wouldn't handle the mass of data people put into spreadsheets here
I don't know, all I know is LibreOffice Calc performance is horrible compared to Excel
it's like alan says, spreadsheets are what people use to make programs when they get tired of waiting for months for the engineers to write special-purpose programs
yeah that's really bad in spreadsheets, because people tend to mix data and presentation together. And when that becomes my input I am truly, utterly disgusted
noone thinks how the data will flow, they just want to see nice views of the data and that's it
@micha: is there any resources you can recommend (for cljs in general)? I'd love to e.g. see someone work with chrome, debug stuff etc. I watched your hoplon talk with Alan and most of the vids (if not all) on the old hoplon page
the best concept I ever saw was this though - https://github.com/mawww/kakoune
I'd love to get the kakoune bindings in emacs or lighttable or something. But I don't have the time and will
and writing plugins is, hm, interesting, since the editor doesn't have a scripting language. You should just use what you like and pipe stuff in and out
still, if you like to try out editors I highly recommend this. I had trouble coming back to emacs after using kakoune since the editing is so great
and the basic bindings aren't that complicated. Shouldn't be that hard to reimplement in another, more full-featured editor
if you have paredit everywhere you can write powerful functions to manipulate the content
like on my cinema display if i don't have vertical splits, the code is way over to the left