HackerTrans
TopNewTrendsCommentsPastAskShowJobs

aeonflux

no profile record

comments

aeonflux
·قبل 20 يومًا·discuss
I don't really understand where is this need to compress the logic into where small chunks comes from. In result we get single line of code which has multiple statement conditions, different paths, and it's not possible to grasp in one go.

Other practical example why ternary is bad: Many code-coverage solutions break on ternary because they don't correctly see that one of the branches was missed in tests.
aeonflux
·قبل 20 يومًا·discuss
Those two behave in the same way if you drop the parentheses:

1. statement if (condition || something)

2. (statement if condition) or something
aeonflux
·قبل 8 أشهر·discuss
I don't think rewrite the in Scala was great decision, business wise. Fast forward 15 years its way lower on popularity than Ruby. Not sure what they use these days though.
aeonflux
·قبل 8 أشهر·discuss
"There are only two kinds of languages: the ones people complain about and the ones nobody uses." -- Bjarne Stroustrup, The C++ Programming Language
aeonflux
·قبل 8 أشهر·discuss
Results from outsourcing can vary. You might end-up with totally unmatched 5 candidates and complain that there is no good people on the market. How would asses that the agency did good job (or any job at all)?
aeonflux
·قبل 12 شهرًا·discuss
Types are helpful in large codebases, but in Web Apps they tend to get into the way more than they help. You can still use semi-typed constructs in Ruby, but you have the freedom to choose where you need them.

After moving to writing web in Go (from Ruby) I am still baffled how much more boiler plate there is and how much slower things move because of this. Types are great when you want to refactor some things, but thats just part of the job.

In Ruby I loved how can you just quickly jump into REPL or just do inline breakpoint to inspect state: `scope.map(&:names).last.tally.sort_by(&:last).reverse.first(10)`

Something like this is such a chore in Go that I simply skip it more often than not.

> it uses a lot of special characters, which makes writing the code slower

I don't get this part. What special characters?
aeonflux
·السنة الماضية·discuss
Hey man, you should really put some effort into formatting the code samples, as they are awful to read.
aeonflux
·السنة الماضية·discuss
Could you point out where do you get your data from? Anything to back-up your claims that Rails is in decline and Elixir/Phoenix is growing? For a time not long ago I was heavily into looking for an Elixir gig, but couldn't really find offers, while there were still tons of offers for Rails development.
aeonflux
·السنة الماضية·discuss
List is available after paying. Which makes a lot of sense.
aeonflux
·قبل سنتين·discuss
This project pretty much pivoted into https://dragonruby.org, a framework for making 2d games in Ruby. It's pretty active and in-development, but has nothing to do with building cross-platform apps per se. No idea why this was posted.
aeonflux
·قبل سنتين·discuss
I do ask this question in a initial questionnaire. I list bunch of technologies and just require this input. I do agree with all the points in the article, but my goal is to have relative scale. I am not able to verify all the needed technologies, but I can do verify few. Whatever the scale candidate choose, I assume its consistent. If someone self-scores 9/10 out of Postgres and doesn't understand basic things, I can safely assume his other 9/10 are worthless.
aeonflux
·قبل 3 سنوات·discuss
Pointless story about running outdated, vunerable software.
aeonflux
·قبل 3 سنوات·discuss
Is this only available in US (on iOS)?
aeonflux
·قبل 3 سنوات·discuss
Yeah, like others said. You don't.
aeonflux
·قبل 3 سنوات·discuss
Despite their shady practices I still only book through Booking.com when I to unknown places for the firs time. At the end of the day Booking sticks to customers when theres an issue and all the Venues/Hotels seem to care about their relation with Booking.
aeonflux
·قبل 3 سنوات·discuss
I remember that story differently. No one is obligated to respond to Atwood questions just because. But gentleman don't need to start digging into unrelated stories to discredit someone. Let's stick to point here.
aeonflux
·قبل 3 سنوات·discuss
My only issue is that GPT training set is locked like 1-2 years ago. I often find myself looking for recent stuff in Google.
aeonflux
·قبل 3 سنوات·discuss
If you want to go full circle you can send the ⌘-C and ⌘-V key events before/after they query. This will just send selected text and replace this with answer. I prefer not to do that, since queries are quite slow and I rarely block waiting for round trip. I also use vim and vim mode in lot's of apps, so replace works differently there.

I prefer to use clipboard as the exchange place. I select text, copy it, then query the service. Once the query completes I can see the answer in popup and can paste it to my current editing place.

This is the code:

  local hyper = {"cmd", "alt", "ctrl"}

  hs.hotkey.bind(hyper, "Y", function()
    local url = "https://api.openai.com/v1/completions"
    local api_key = "..."

    local headers = {
      authorization="Bearer " .. api_key,
      ["content-type"]="application/json",
      accept="application/json"
    }

    -- hs.eventtap.keyStroke({"cmd"}, "c")

    local message = hs.pasteboard.readString()

    local data = {
      prompt=message,
      model="text-davinci-003",
      max_tokens=32,
      temperature=0
    }

    hs.notify.new({title="OpenAI query", informativeText=message}):send()

    hs.http.asyncPost(url, hs.json.encode(data), headers, function(status, body, headers)
      local response = hs.json.decode(body)
      local answer = response["choices"][1]["text"]

      print(body)

      hs.notify.new({title="OpenAI response", informativeText=answer}):send()
      hs.pasteboard.writeObjects(answer)
      -- hs.eventtap.keyStroke({"cmd"}, "v")
    end)
  end)
aeonflux
·قبل 3 سنوات·discuss
How are they using ChatGPT - is there an API? Or is this simply abuse of TOS?
aeonflux
·قبل 3 سنوات·discuss
Of course. I use this in Hammerspoon. The API call is simply in Lua.