« first day (1090 days earlier)      last day (776 days later) » 

00:01
@Alucard good job, not bad.
@Dodge welcome back!
@AaronHall I though I never left, lol. I'm going to try to keep logged in here on one device or another. As much as I love Python and R, Haskell is great to have something to contrast the former two languages with.
@Dodge Haskell is my second focus next to Python, and I feel like I've pretty well mastered Python.
@AaronHall Ahh, the good ole' monad (reading the post from earlier) I read the first five answers on SO for "what is a monad" and still don't have a solid understanding. My current understanding is that it is a wrapper that allows for mutation
Some have called it "like a burrito." :D
It's a monoid in the category of endofunctors.
A monad is an endofunctor monoid.
@AaronHall Burrito you say? (stomach grumbles) That's a concept I get
00:09
An endofunctor is a mapping from category to itself.
@AaronHall I need to start with something small and super easy, thinking about firing up the GHC tonight and reminding myself how to do something extremely simple
Ok mapping a category to itself is easy enough to comprehend
A monoid is an algebraic structure that defines an associative operation, and an identity operation.
a list is a monoid because (list_a + list_b) + list_c == list_a + (list_b + list_c) and [] + a_list == a_list + [] == a_list
Matrix multiplication is a monoid too...
now that I think about it.
Ahh ok simple enough I guess
I'll let that swirl around in the brain for a bit
half baked idea: and if shell programs consume and spit out streams of text, and a piped cat is an identity operation, then the pipe is a monoid too. and also a Monad because streams of text are the same type of data...
I get why we use a pipe in the Linux context, is the usage in Haskell for Monad the same? Just to pass data from one function to the next?
00:18
It doesn't necessarily imply that we take data from one and apply it to the next - remember that list is also a monad.
Just that we have some associative operation where it doesn't matter where the parentheses go...
And I believe that associative operation is called "bind" for lack of a better generic term.
Got it, and you just gave the list example... doh :)
stepping away for a sec
ok.
ping me to resume! :)
01:10
@AaronHall now, i will record how i will make my program: checklist: systemdate(year) and a prompt, should be doable!
@Alucard Just got GHC setup on my machine again. I've forgotten everything I knew about Haskell. Time for a "hello world" example.
*Main> :t sqrt
sqrt :: Floating a => a -> a
Ahh, that feels better
But that ins't really even Haskell, rather a tool built into GHC to show type :)
01:35
Okay concat two lists for a "hello world" example:
numbers = 1 : 2 : 3 : []
moreNumbers = 4 : 5 : 6 : []

allNumbers = numbers ++ moreNumbers
*Main> allNumbers
[1,2,3,4,5,6]
@AaronHall I guess Code-Apprentice hasn't been around as much lately?
01:47
@Dodge Haven't seen 'em much. Hope it wasn't something I said...
@AaronHall Naa, he seems like he'd be hard to offend, I watched some of his Twitch streams and he did not come across as delicate by any means.
Ok everything is fine, but one thing
the output
i can't display strings and integers in one line for some reason, or I don't know how
i use this:
putStrLn ("Yikes, your survived " ++ age ++ " years!") where age is an integer
the error the compiler gives is the following: "Couldn't match expected type ‘[Char]’ with actual type ‘Integer’"
02:02
@Alucard static typing, hmm how does one change an integer to a string in Haskell
ah ok
got it working :D
@AaronHall type sensitive(?) was a huge hassle, but i guess it has it's advantages?
import Data.Time.Clock
import Data.Time.Calendar
import Data.Time.LocalTime


main = do
    putStrLn "Please enter your birthyear:"
    birthyearraw <- getLine
    let birthyear = read birthyearraw :: Integer
    now <- getCurrentTime
    timezone <- getCurrentTimeZone
    let zoneNow = utcToLocalTime timezone now
    let (year, month, day) = toGregorian $ localDay zoneNow
    let ageint = year-birthyear
    let age = show ageint
    putStrLn ("Yikes, your survived " ++ age ++ " years!")
02:23
@Dodge show is like str in Python
@BrunoLange welcome!
oh, i thought this was a rhetoric question, sorry for that!
@Alucard maybe it was...
No, it was a serious question
@AaronHall also, systemtime should be a standard function of haskell, i downloaded some hackagestuff for this...
@Alucard Nice work, just ran it and it works but we have a bug:
*Main> main
Please enter your birthyear:
23
Yikes, your survived 1996 years!
02:30
well, if you where born in 23 then you are oooold^^
If my birth year was 23 then I should be 96
mmh, that's a misunderstanding from myself, i thought you always enter a date like this: 1637 or 1923 or 42 ;)
@Alucard oops! That was my fault, I assumed I could leave off the century, sorry
it does what it's programmed for, but what it's programmed for isn't much haha
Total mistake on my part, that's what happens when one tries to do too many things at one time :)
02:35
a slight bug is imo if you didn't have birthday already this year
then it gives you one additional year ;)
True, but it is perfect for a simple challenge, good job!
Now, I'll get back to my tutorials
@AaronHall youtu.be/nLLrDwH0Hdo I just thought wrong
@Alucard look at you, you're coding. :)
better than going on the street, if you know what I mean haha
apropos going on the street, i just take a walk and listen to music but i have to wait for my mp3 player to reload
03:11
ok guys, gotta go to sleep!
 
10 hours later…
12:49
Good Haskell morning!
So far so good :)
@AaronHall Do you ever get bumped off the site (SO)? I was logged into Haskell and Python Rooms on my old desktop and when I got to the office this morning I had to log back in, kind of strange.
@Dodge Not usually, but sometimes. I consider it part of security. Mods can also log you out if they think they should.
Like when a model citizen suddenly starts posting spam...
13:21
@Dodge nevermind...
14:14
@AaronHall hi :)
@Dodge hi :)
14:30
@AaronHall I stepped away..
@Alucard Howdy!
14:42
Hi! I want to learn Lisp. Can you suggest a good resource for learning Lisp from beinnger's perspective? Thanks
@Pandya which lisp?
ooh, gotta teach for about an hour in 15 minutes.
@AaronHall Which topic you teach?
@Alucard python.
Maybe one day that will expand to Haskell...
@AaronHall I walked today some streets. Very calming down and making happy :)
@AaronHall Python is probably much easier to teach than Haskell I would imagine
14:50
@Alucard yes, exercise is good...
@Dodge It depends on what you know. I see people teaching Python making mistakes all the time and figure that's what would happen if I tried to teach Haskell...
TIL learned there is no contemporary Lisp per se but only modern derivatives.
15:37
@Dodge oh yes. and they all use different names for most of their builtin functions.
I started a TDD just for fun project in clojure, that was actually not a bad experience.
As an emacs user, I try to write as little elisp as possible.
@AaronHall Don't have much idea which one should I use. I want to learn Clisp but it's not available on repository so, installed sbcl
> $ sbcl
This is SBCL 1.3.14.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
I installed Steel Bank Common Lisp (SBCL) about 10 years ago...
It was the best common lisp at the time.
for ubuntu anyways
didn't do too much with it though.
Haven't touched Scheme/Racket.
If I was in a Java environment, I'd be pretty happy with Clojure.
16:13
Training is over. Anyone got any thoughts on what the Haskell ecosystem needs right now?
@AaronHall I would need to take inventory of what the Haskell ecosystem currently has to offer
@Dodge well maybe that's a good idea for us to share as well.
I was thinking about this last night because the best way for me to learn a language is to build something and with Python that usually involves leveraging a few libraries
standard library libraries or third-party libraries?
Both really
16:32
yep, usually have to do that.
16:45
The problem with Haskell is stuff that's in Python's standard library is in 3rd party libs for Haskell.
And so then you don't really know what's the solid stuff that everyone uses.
An inventory might help with that...
Yeah, that's what probably I would have guessed (3rd party libs), the article I linked from this morning talks about a company called FP complete that links is working on enhancing the Haskell ecosystem, they sponsor coding challenges and such for this purpose
@Dodge yes, and that's a good thing.
@Dodge Looks like they've got a lot of training material (though it might be incomplete) haskell.fpcomplete.com/syllabus
Hey that's cool, although I'm far from intermediate it's nice to know that's there
17:40
@AaronHall I agree, with my limited perspective.
17:56
@Code-Apprentice hi :)
 
2 hours later…
19:55
@Alucard hey
I haven't spent much time here for a while
How are things?
 
1 hour later…
21:04
@Code-Apprentice Aaron asked us to point out what Haskell should deliver to have an edge versus other languages.
Things are great :)
I haven't done any Haskell for quite some time.
I said the same thing last night, fired up the GHC for the first time in months
21:55
@Dodge I fired up Android Studio yesterday to work on my app and spent most of the time downloading updates

« first day (1090 days earlier)      last day (776 days later) »