This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-12
Channels
- # babashka (6)
- # beginners (23)
- # calva (27)
- # cider (1)
- # clj-kondo (23)
- # cljsrn (2)
- # clojars (4)
- # clojure (90)
- # clojure-dev (8)
- # clojure-europe (1)
- # clojure-serbia (1)
- # clojure-spec (2)
- # clojurescript (9)
- # code-reviews (7)
- # core-async (1)
- # cursive (4)
- # datomic (13)
- # emacs (2)
- # hoplon (28)
- # juxt (12)
- # leiningen (1)
- # malli (22)
- # nrepl (3)
- # off-topic (51)
- # reitit (8)
- # shadow-cljs (16)
- # spacemacs (25)
- # sql (4)
- # test-check (5)
- # tools-deps (5)
Im desperate, I'm going crazy. Does anyone know what a function (e.g. {1, 3, 4} => [0,1,0,1,1]
) that maps a set of indexes to a vector of booleans is called? (or what that kind of vector is called?)
a bit vector/bit array?
(defclass MyList
:java-interfaces [Iterable]
:methods
{:--init--
(fn [this]
(write-slot this :underlying (ArrayList.)))
:add
(fn [this item]
(.add (read-slot this :underlying) item))
:iterator
(fn [this]
(.iterator (read-slot this :underlying)))
:--str--
(fn [this]
(.toString (read-slot this :underlying)))
:--hash--
(fn [this]
(.hashCode (read-slot this :underlying)))
:--eq--
(fn [this other]
(and (is-instance? MyList other)
(.equals (read-slot this :underlying)
(read-slot other :underlying))))})
(def my-list (doto (make-instance MyList)
(call-method :add 1)
(call-method :add 2)
(call-method :add 3)))
(doseq [item my-list] ;; Implements Iterable directly
(println (str "I got a " item)))
(.forEach my-list
(reify Consumer
(accept [_ x]
(println (str "I got a " x)))))
I got a 1
I got a 2
I got a 3
=> nil
so now multiple inheritance and extending java interfaces is supported (with asterisks)
How do people generate these “screenshots” of a minimalist editor with some code, to put in Twitter etc?
Haven't used it myself, but had https://github.com/carbon-app/carbon bookmarked.
I've always wondered how people did this. I always made a screenshot in emacs myself 😉
Haha :)
I just want to do some twitter rambling from my phone 😄 Not nearly time enough to write proper blog posts any more, but I have a phone in my hands most of the time these days…
making pictures is one thing, but writing functions while walking would be a life-saver function for me
For sure. Replete has a REPL but I don’t think that typing code in a mobile keyboard can ever be ergonomic.
No, I don't think so, if anything will work it will be something that fully uses the phone's capabilities (such as touch on the whole screen, motion sensors etc.). Just trying to take a dev env from desktop is obviously futile
@U7PBP4UVA If you're on either a Windows or macOS system (rather than your phone), both O/S's have a built-in way to grab a rectangular section of the screen, which is what I use for posting code fragments (I use Atom as my editor so it's already color-coded against a dark background). Carbon looks very nice, as a consistent way to create/publish such things -- I'll have to bookmark that!
i've been a big fan of the contrib libs moving to a 1.0.0 release number. Thanks for those who decided to do that and got it done
I believe Alex Miller did most of the work on that, and probably had a big hand in the decision, too
Yeah. Didn’t want to ping and disturb him. Figured he’d see it though. I still have no idea about mention etiquette on slack :)
I just had a short "discussion" on reddit about future planning. It seems like I was the only one who thinks its normal to have a vague plan about your future 5 years, regarding your career, or from a business point of view, regarding your business. Am I somehow totally out of the loop here and missed something?
IMHO, I think it is normal to make (extensive/practical) plans among people that end up being successful.
"Where do you want to be in five years" is a pretty standard question in interviews at least in my country, and I never had a clear answer on that.
Well, there are some standard answers https://funnyjunk.com/funny_pictures/4403239/On+my+way+to+the+top/
@sveri When I was younger, I definitely had a "career plan" and worked toward it.
It's one in my country too and I actually do think it's a reasonable question. I mean, it's obvious no one predicts the future, but having goals or at least thinking about them from time to time is a good thing.
I wanted to be the senior architect in a software company and oversee all large projects... from back when I was really only a junior programmer.
I achieved that at Macromedia (in 2000). Since then I've been able to really just follow my interests, wherever they lead me.
> Since then I've been able to really just follow my interests, wherever they lead me. I feel more aligned to that as well.
(I was 38 in 2000, just as I joined Macromedia, to put that in context)
Part of my "plan" from my mid-/late-20's onward was to move from the UK to the USA by the time I was 40, and that happened too (in 1999).
In about 2000 I was still fully into Dreamweaver And Flash and that. Ooh the memories. This was the cambric explosion of Webdesign. Nowadays all is paper flat and so textual.
I used DW a lot around that time but never got into Flash (although I did spend several months working with the Flash Player team on the compiler test suite for ActionScript, toward the end of my six years at Macromedia, due to my background in compiler design and ANSI Standards for C and C++).
That platform worked surprisingly well.
After I left Adobe, I worked for a startup that built a really cool desktop collaboration app using Flex and Air, with file sharing, chat, and 1:1 video calls. It was ahead of its time I think and we couldn't convince many customers to sign up 😐 That was back in 2008 I think.
My goal somewhere at the start of this decade was to become a freelance Clojure developer, remote, which I've been doing for almost 4 years now, still enjoying it.
I mean, following your interests is a valid goal too in my opinion, but you still know what you want. I really don't want to argue about good / bad goals either, as I don't think such a connotation exists in regards to goals, as long as you don't want to become a serial killer.
@sveri Yes and no. 5 years seems like an arbitrary timespan to me. I've never pursued goals by forcing it into a timespan, just following interest and passion, the rest kind of falls out of that.
It can be helpful to write your dreams down and then taking action. Like any project, planning the actions is probably only doable in terms of weeks, not years.
I recently listened to a podcast about Shape Up, a methodology they use at Basecamp. The Basecamp person was asked why they worked in chunks of 6 weeks. Because 2 weeks sprints were too short to get anything meaningful done. And 6 weeks was about as a far as they can plan ahead, further than that just doesn't seem to work for them.