[-] mrroman@lemmy.world 14 points 2 months ago* (last edited 2 months ago)

I don’t know what is Altman’s experience, but almost nobody writes software character by character for many years. Context code completion is present for about 30 years already (take a look at Delphi or VS6 from 90ties). Refactoring tooling is about 20 years old too (see Eclipse or other Java IDEs). So if he says character by character, it is just silly. When you write prompt you also write is char-by-char right? :).

[-] mrroman@lemmy.world 10 points 1 year ago

They have Mastodon instance. I don't know why it's not advertised.

2
submitted 2 years ago by mrroman@lemmy.world to c/clojure@lemmy.ml

I've created a small library that allows to create mock functions. You can record the calls to the function and check arguments with it. It happened to me multiple times that somebody has changed the function that was mocked and it didn't comply with the values returned by mock or the function was called differenty in the code.

I recently added a support for instrumentation of mock functions with Malli schemas. If you declare a mock for a function that has Malli function schema, it will instrument the mock. This allows to discover mocks returning invalid values or accepting invalid arguments or the number of arguments.

Here's an example:

(require '[malli.core :as m])

(m/=> my-inc [:=> [:cat :int] :int])
(defn my-inc [x]
  (inc x))

;; You have to provide a symbol of function 
;; or with or without namespace (aliases are supported).
(def my-inc-mock (mock-fn 'my-inc 1))

(my-inc-mock 0)
;=> 1

(my-inc-mock "foo")
;=> An exception ::invalid-input

(def my-inc-mock2 (mock-fn 'my-inc nil))
(my-inc-mock2 1)
;=> An exception ::invalid-output

This instrumentation works also with a macro for defining mocks.

(with-mocks [my-inc 2]
  (my-inc "foo"))
;=> An exception ::invalid-input

(with-mocks [my-inc nil]
  (my-inc 1))
;=> An exception ::invalid-output
[-] mrroman@lemmy.world 3 points 2 years ago

I wonder if they are sure that similar exercises weren’t in the learning set for AI. Such competitions have usually kind of patterns for exercises and people usually learn to them by resolving a large number of exercises to catch the pattern.

92
submitted 2 years ago by mrroman@lemmy.world to c/pics@lemmy.world
[-] mrroman@lemmy.world 1 points 2 years ago

I'm using http://deb.debian.org/debian mirror, but I was surprised that it didn't download files with apt-get update command. I removed /var/lib/apt/lists directory, and it worked and upgraded to 12.1 :).

[-] mrroman@lemmy.world 1 points 2 years ago

I've upgraded packages several times. My base-files package has version 12.4. I've tried with apt update and apt upgrade -s and I don't have any package to upgrade. Is it possible that the version is locked somewhere?

5
submitted 2 years ago by mrroman@lemmy.world to c/debian@lemmy.ml

I have updated packages many times after 12.1 release, but I still have 12.0 in debian_version file. I tried to install today printer drivers but it couldn’t get the latest libcupsimage2 2.4.2-3 library on the server although there is 2.4.2-5 already.

How to fix the version? Is it possible that it breaks cupsimage installation?

mrroman

0 post score
0 comment score
joined 2 years ago