Fork me on GitHub
#off-topic
<
2017-11-08
>
qqq05:11:53

1. I'm using git. 2. I have a file src/server/scala.clj 3. I want to retrieve, from git, ALL versions of this server/scala.clj file 4. How do I do this ?

phronmophobic05:11:45

you can do git log -- src/server/scala.clj to see all the commits that changed that file

phronmophobic05:11:06

git log --online -- src/server/scala.clj will be more concise/greppable

phronmophobic05:11:20

and then git show <commit id>:src/server/scala.clj to spit out just the contents of the file at that commit

phronmophobic05:11:23

git log --oneline -- src/server/scala.clj | awk '{print $1}' | while read commit_id; do git show $commit_id:src/server/scala.clj > "$commit_id"_scala.clj ; done

phronmophobic05:11:49

will spit out a bunch of “<commit id>_scala.clj” files in your current working directory

qqq07:11:50

@smith.adriane was afk, resolved this issue (via stack overflow), but: 1. the commands look very similar 2. thanks for writing this out in detail

roklenarcic10:11:26

If I want a simple DB that's contained in a file, how does H2 compare to SQLite? Does anyone know pros/cons?

borkdude12:11:38

@roklenarcic Not sure if it matters much between those two. I’d go for H2 since it’s more Java centered (https://db-engines.com/en/system/H2%3BSQLite).

borkdude12:11:44

@roklenarcic However, I would also take a look at https://github.com/dscarpetti/codax if your requirements are only Clojure data structures

borkdude12:11:44

but if you want to migrate to another SQL db in the future, H2 might be the best option

solf15:11:36

I just got refused at my dream job because I didn't had enough functional programming experience. I've been interested in functional for years, but I've never had the opportunity to use it at work, and I was too damn lazy to do it by my own, I didn't get the job.

solf15:11:55

I'm not feeling like this again, time to work harder towards what I really want

Olical15:11:38

Keep at it 🙂 I was refused by one company (not enough cljslightly_smiling_face: then refused from another a few years later (not enough clj). Finally, a few months ago, I was accepted into the first one since I'd learnt enough by doing things on the side. I kept pushing it as much as I could at work too, teaching JavaScript developers I was working with about ImmutableJS and the like. Even building some tiny services in Clojure with permission from people I worked with.

solf15:11:10

Thanks. So you got in the company that rejected you at first? That's inspiring, because I'm definitely gonna call the company that refused me once I have more experience in clojure.

Olical15:11:08

Yup, I was rejected a few years back by the same guy because I just didn't know enough and they needed someone who could actually contribute right away. Since I've joined we've turned people down for the same reasons (although we have offered to hire one person as a junior that we would train up (no response)). Best thing I can recommend is an interesting GitHub, so tinker, fix bugs on things, do exercises in books. Just be visible online doing the thing you want to do day to day. It's how I started as a programmer in JavaScript and how I moved to Clojure(Script). Just do stuff, even if it's not amazing, to show that you're invested. You'll also see your progress clearly as you look over your old projects, which is fun.

Olical15:11:13

The problem I have now is that I have to maintain a bunch of open source JavaScript that I don't like looking at 😝

sundarj15:11:16

@U38J3881W just mark it as abandonware and you're golden 😉

solf15:11:54

Ahah. At least I'll be able to learn from your mistakes and start directly with clojurescript 😛

Olical15:11:28

@U61HA86AG haha, I wish I could. They have 900 and 2.2k stars respectively, so I feel like I should keep kicking them along. A lot of the issues now are people telling me it doesn't work with some version of TypeScript. People keep trying to add things to something I've seen as "done" for years 😄 maybe I'll lock them one day...

sundarj15:11:58

@U38J3881W that's honorable of you :~)

maleghast15:11:26

@U61HA86AG - Interesting thread… Just curious, why did you tag me though? 🙂

sundarj15:11:57

@U08ABGP70 i'm so sorry, it's that silly slack popup thing

Olical15:11:00

Slack doing the old "pick anyone called Oliver and it's probably fine" dance.

maleghast15:11:06

Oh no worries 🙂 FWIW, @U7S5E44DB I am finally doing Clojure / ClojureScript full time by being Engineer #1 at a new start-up and persuading the CEO that I am right to pick the stack 🙂

maleghast15:11:11

So that’s another route into it… 😉 I’ve been programming in Clojure for about 6 years, done a tiny bit of paid work before and a TINY bit of Clojure got onto the stack at previous employers… What I’ve learned in the last 5 months has been a revelation, but I don’t remotely regret the decision. 🙂

sundarj15:11:52

the moment i have the chance to sucker punch clojure into a project here i am doing it 😈

Olical16:11:23

At my previous one, where I was hired to write JS, I extended our hubot with some useful stuff by writing a Clojure server and talking to it from a tiny hubot plugin. Was a good thing to talk about in interviews too.

danm16:11:44

My public GitHub is empty. I spend all day coding and enjoying it. I don't have any desire to spend my free time doing that too though...

danm16:11:04

I can talk about loads of stuff we do in-house assuming I get to interview though

Olical16:11:16

I have a friend that doesn't like the "you must have an active GitHub" mentality, and I totally get it. It's just a good way to get into something if your employer won't pay you to do the thing you want. If you can get paid for it, by all means 😄

sundarj16:11:57

@U6SUWNB9N i hear you man, at home i only code on occasion (or when i am, it's helping my mates with their code instead of doing my own). plenty of other things i want to do :~)

seancorfield17:11:12

If I'm in a job where I'm coding a lot at work, I tend to neglect my GitHub repos. If I'm in a job where I'm mostly managing, or mostly being an architect (and hands off), then I have to find time to write FOSS code otherwise I go insane 😐

roberto17:11:31

My github activity is very sparse, most of my work is in private repos for clients. I would not be an interesting prospect if people only looked at my Github. Working on side projects has also declined because I have a 4 year old, and when I have time to do some side projects, I normally use it doing research/education.

seancorfield17:11:17

As a hiring manager, I find it helpful if a candidate has a GitHub repo but I wouldn't discount anyone for not having one. In some ways, I'd look harder at a candidate who has a GitHub repo: they're saying "Here's code I think is good enough for others to use" -- so if I think it's poor code, they're more likely to be cut before the interview.

seancorfield17:11:35

Of course, if it's good code, then that does improve their chances 🙂

sundarj17:11:02

ah, but i personally just put all of my code on git(hub|lab), regardless. i wouldn't want people to use the code on there, it's just for my sake 😁

sundarj17:11:52

guess i could pay for premium and use private repos, but haven't needed them

sundarj17:11:45

if i wanted to create a portfolio of my best code, i would do that specifically, on a website

seancorfield17:11:24

@U61HA86AG And that's a reasonable approach too, but even "throw away" code on GitHub tells you something about how a programmer approaches problems.

sundarj17:11:04

fair enough

borkdude17:11:13

Without eval-ing in your REPL, what’s the result of (#()): an exception or a value?

borkdude17:11:23

(I was surprised it was a value ;))

sundarj17:11:41

'#()
(fn* [] ())
it expands to this @borkdude

sundarj17:11:31

pretty fun

sundarj17:11:11

at first i misread your snippet as (#{}), which is indeed an exception 😉

qqq18:11:23

I know that Java offers the Convolution operator on BufferedImages. Does Java also offer such an op on float-arrays ?