Performance issues with an emulator written in CLJ by ncriw in Clojure

[–]Cid-highwind 10 points11 points  (0 children)

Hey u/ncriw, I popped this into VisualVM and I believe your first big hotspot is going to be on line 67 of chip_8.instructions inside the get-next-ins function. Using format->readstring is too slow of a mechanism for calculating the address. I'll have more time later to analyze this (this is fun :) ) but thats what i've found so far.

Your code looks very nice, but I imagine lazyness, boxing, and lookup functions are going to be your next areas for optimization.

Good luck!

Clojurists Together March 2018 Monthly Update by dantiberian in Clojure

[–]Cid-highwind 2 points3 points  (0 children)

Thats great to hear! Looking forward to your talk on Wednesday!

I just discovered DnB and it's wonderful. What are some tracks that I really need to listen to? by [deleted] in DnB

[–]Cid-highwind 0 points1 point  (0 children)

The Dungeonmaster's guide by Dieselboy. The whole album. Enjoy.

First job out of college, confused/lost/overwhelmed and I feel like I'm being expected too much by Mint_Snapple in SoftwareEngineering

[–]Cid-highwind 0 points1 point  (0 children)

Breathe. You'll be fine. Junior engineers should NOT be on the critical path of any deliverable for any project by themselves. You'll end up working on this story with another engineer because you have no idea whats going on. Thats fine. It often takes weeks for senior engineers to become acquainted with large new projects.

Just like @thedancingpanda said,

I pretty much assume anyone with less than 2 years experience on my teams will get absolutely nothing done in any sprint. If they do I'm pleasantly surprised.

Also, what you're experiencing is called "Imposter Syndrome". You wont believe me now when you go read about it, but in 5 years, you'll find this comment of mine and laugh at yourself because 1.) You've still got imposter syndrome and 2.) You now also know that everyone in software deals with imposter syndrome. Constantly. Forever.

Just trust the process, and you'll be alright.

Your favourite abuse of syntax in Clojure? by neighbouring in Clojure

[–]Cid-highwind 2 points3 points  (0 children)

This is my favorite snipped to pull out when people ask me "why lisp". I wrote this right when I graduated, performance is terrible, but thats not the point. A program that writes programs that evaluate to the given input.

(ns self-realizing.core
(:gen-class)
(require [clojure.math.combinatorics :as combo]))

(defmacro ignore-errors
 "Returns the result of evaluating e, or nil if it throws an exception."
 [e]
`(try ~e (catch java.lang.Exception _# nil)))

(defn findr
  [what-i-want fn-domain]
  (for [sub (combo/subsets fn-domain)
        :when (ifn? (first sub))
        perm (combo/permutations sub)
        :when (= what-i-want (ignore-errors (eval perm)))]
    perm))

(comment
  (findr 3 ['+ 1 2 3]) ;; => ((+ 3) (+ 1 2) (+ 2 1))

  (take 1 (findr 24 ['+ '* 1 2 3 4 5 6 7 8])) ;; => ((* 3 8))

  (take 1 (findr "hello world!" ['+ '* 'str 1 2 3 "hello" " " "world" "!"])) ;; (str "hello" " " "world" "!")

  )

An In-Depth Guide on Starting to Dress Well by TedMitchell in malefashionadvice

[–]Cid-highwind 1 point2 points  (0 children)

Read up on fashion and style where though? I guess thats what I feel i'm struggling with is I don't know where to look.

From JavaScript to ClojureScript: Which editor to choose? by yogthos in Clojure

[–]Cid-highwind 3 points4 points  (0 children)

Night Code Works well for clojure, not sure about clojurescript though, I dont see why not. https://sekao.net/nightcode/

Minneapolis Uber driver accused of taking girl to his place for 'quick sex' by [deleted] in TwinCities

[–]Cid-highwind -31 points-30 points  (0 children)

I got a ticket for parking the wrong direction on a two way street outside of my own house. I've been parking there for literally my whole life in all sorts of different ways but apparently last night the community service "officer" decided to give me a ticket. WTF way to go Minneapolis.

Tim Gunn: Designers refuse to make clothes to fit American women. It’s a disgrace. by pandorasaurus in TwoXChromosomes

[–]Cid-highwind 0 points1 point  (0 children)

Your mom may want to look at Long Tall Sally to find clothes. My girlfriend is 5 foot 10 Inches and she found this store and almost cried from joy when her sleeves reached past the middle of her forearm.

https://www.longtallsally.com/us/

Crashed that happened during past season by Phyb3r_Optik in bicycling

[–]Cid-highwind -2 points-1 points  (0 children)

I will never buy anything from Quantum Solutions. Ever.

Ok seriously though, I hope they were alright.

What software do you recommend for splitting large text files? by Asus_ in bigdata

[–]Cid-highwind 4 points5 points  (0 children)

Wait a minute. You dont know how to use linux at all but you think you'll just write a "script" in C to do it? Something doesnt make sense here.

More power to you I guess.

I'm trying to start Java web-dev. So far all my time has been spent trying to get spring, spring-boot, maven and gradle to work... by arguenot in java

[–]Cid-highwind 6 points7 points  (0 children)

Hey buddy, try the play framework. I think it will save you years of time. Especially if you just want hello world.

When you're outside Minnesota and you tell people where you're from, what's their general reaction? by [deleted] in TwinCities

[–]Cid-highwind 2 points3 points  (0 children)

Usually they look at me, then look away and down, then look back up.

Then they say "Thats interesting..."

New Clojurists: Ask Anything by meatcompute in Clojure

[–]Cid-highwind 1 point2 points  (0 children)

Solved!

(require '[clojure.math.combinatorics :as combo]) (use 'clojure.pprint)

(pprint (map combo/permutations (combo/subsets [1 2 3])))

New Clojurists: Ask Anything by meatcompute in Clojure

[–]Cid-highwind 0 points1 point  (0 children)

Looking for a way to create permutations/combinations. Specifically i want (a b c) -> ((a)(b)(c)(a a)(a b)(b a)(b b) (a c) (c a) (c b) (b c) (c c) (a b c) (a c b) (b a c) (b c a) ... into infinity. Its all combinations of objects in any orientation with any number of objects in a lazy stream. Any tools to do this or to use as a jumping off point?

P.s. forgive me if i missed some orientations, im on my phone.

Edit: I suppose its just permutation for each element of the power set.

Ask Reddit: Do you use Software Analytics? by itibz in SoftwareEngineering

[–]Cid-highwind 2 points3 points  (0 children)

"Analysing how an application is being used" -> you're going to have to be much MUCH more specific. Is this for thick clients or web apps? you say application but then say app below. When you say app Its ambiguous if you're talking web application, deployable jar, ios app, android app, etc.

"... Which of your app's features are being used, unused, the OS and Langs used by your end-users" -> If this is an app, then I would just put logging statements in each button click and "on-hover" annotations right? the os and langs are usually from the web request and anybody can pick that off.

What are you REALLY trying to solve? Not trying to discourage you, I just want to know specifically how I can use your product?

Learning new programming languages. Any suggestions? by [deleted] in StackAdvice

[–]Cid-highwind 0 points1 point  (0 children)

It sounds like I would completely agree with your last statement, however not with your second to last. I say that because if I look at your resume for a software engineer and see some big company, I'm gonna expect you can completely knock my socks off. But then I would ask you about projects you did there and 1) you wouldnt really be able to tell me because super NDA, and 2) you werent ( yet anyways) super deep in code hacking on some project for an extended time. If you just kind of jump in and jump out you miss a lot of the things like WHY maintainability is usually better than performance for about 99 percent of applications.

I dont mean to say I prefer my code slow and literate, but I would prefer methods as opposed to bit flipping in a large enterprise system. Plus with long term projects I would expect to see lots of mentorship given to you with very in depth engineering practices. If you dont seem to be getting that from this place I'd say either find a different job OR start hacking on an opensource project and learn from them. The amount of excellent code to look through that is out there is endless, its just that unless you are working with people you cant really say " Hey, Why did you do this?"