shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

297
active users

#haskell

4 posts3 participants2 posts today

#haskell beginner question

I can create a function (2*) and apply it to 5:

(2*) 5
10

---

I can create a (1 +) and apply it to 6:

(1 + ) 6
7

--

but how to I create a function that applies to the tuple (5,6) ?

((2 *), (1 +)) (5,6)
ERROR

---

I can do this

(\(x,y) -> ((2 * x), (1 + y))) (5,6)
(10,7)

but I want a "partial" function that I can use in a foldr eg folder (2 * ) 1 xs

learning #haskell ...

.. my brain is being stretched by having to compose functions made of partial functions .. not just one .. but several levels of them!

mathematically it is perfectly sound, but my brain is not yet trained to read code with functions made of functions made of functions, many of which appear to have missing arguments

it's a good challenge !

I’m interested in seeing Fedi’s opinion on this. Also reply with a more detailed opinion and your language of choice if you feel so inclined. Boost if you are interested in this too.

When my compiler reports an error, I most often see this as:

#rust#cpp#c

#haskell users: if you're using stack and you choose to switch your resolver to say, be compatible with HLS (Haskell Language Server), then be sure to run `stack clean`--this messed with me for a long time...

I am in urgent job search mode, so I'm gonna throw this out here and see if anything comes of it.

I am a #Canadian, fluent in both #English and #French. I have experience with several programming languages. My strongest proficiency is with #Haskell and #C. I also have a reasonable grasp of #HTML, #JavaScript, #SQL, #Python, #Lua, #Linux system administration, #bash scripting, #Perl, #AWK, some #Lisp (common, scheme, and emacs), and probably several others I've forgotten to mention.

I am not necessarily looking for something in tech. I just need something stable. I have done everything from software development, to customer support, to factory work, though my current circumstances make in-person work more difficult than remote work. I have been regarded as a hard worker in every job I have ever held.

a #haskell exercise has me puzzled:

What is the C/Java/Python equivalent of the Haskell expression

send metric (double population + increase)?

---

A send(metric(double(population+increase)))

B send(metric(double(population)+increase))

C send(metric,double(population)+increase)

D send(metric,double(population+increase))

It isn't A or D because (double population + increase) is double(population) +...

answer is C but why can't it be B .. where metric is a function taking one argument?

#haskell beginner here.

Is there a "natural number" type so I can use Nat and not Int which is technically incorrect (based on a textbook example)

myrep :: Int -> b -> [b]
myrep 1 x = [x]
myrep n x = x : myrep (n - 1) x

just started learning #haskell

the exercise wants us to return undefined for divisor zero

divTuple :: (Eq a, Fractional a) => (a, a) -> a
divTuple (x, y)
| y == 0 = undefined
| otherwise = x / y

but when I run it, I seem to get an "crash" rather than a value of type undefined:

ghci> divTuple (4,0)
*** Exception: Prelude.undefined
CallStack (from HasCallStack):
undefined, called at 04-syntax-in-functions.hs:21:16 in main:Main

is this right?

@jeremy_list
lineage tracing eg discussion

hey I wanted to relate #lisp and #haskell so I was looking at your #gopher example from before:
gopher://thunix.net/0/~jeremyl
or for the ungopherful
portal.mozz.us/gopher/thunix.n

Is this lisp a good match for what you did?

(defun f-rassoc (child ancestor family)
(let ((person (rassoc ancestor family :test 'member)))
(when person
(if (equal (car person) child) T
(f-rassoc child (car person) family)))))

portal.mozz.usthunix.net

communitymedia.video/w/968LULd #interview with #gopher @someodd #haskell #technology #podcast featuring some #lisp #symbolics #reminiscences

gopher://gopher.someodd.zip
someodd.zip

someodd starting points

Connection was a bit spotty so we talked over each other occasionally. I forgot to boost the show toot, so if you would like to boost here that would be appreciated.

Feedback about the interview and interviews generally are welcome and wanted here.

#lispyGopherClimate #archived communitymedia.video/videos/wa #gopher #technology #podcast #lisp

complete archive peertube

#climateCrisis #haiku from @kentpitman thanks as always!

#interview with exceptionally #libre #gopher @someodd gopher://gopher.someodd.zip and #haskell #programmer . They run a lot of libre services as well. As always questions, boosts welcome

Chat in #lambdaMOO as always
telnet lambda.moo.mud.org 8888
co guest
@join screwtape

@rat @hairylarry @nosrednayduj @prahou @mdhughes