« first day (1527 days earlier)      last day (3638 days later) » 

22:00
I think rightfold wrote a Monad tutorial once.
I may have written a monad once but can't tell cos I don't know what one looks like.
what's monad?
@Gemtastic A box that contains a value.
22:05
259
Q: Monad in plain English? (For the OOP programmer with no FP background)

figIn terms that an OOP programmer would understand (without any functional programming background), what is a monad? What problem does it solve and what are the most common places it's used? EDIT: To clarify the kind of understanding I was looking for, let's say you were converting an FP applica...

A monad has two operations: return (insert a value into the box), bind/>>= (apply a function to the value in a box to get another box with the result of the function).
It's as simple as that.
@Gemtastic Monad is a stupid concept that you won't have to deal with fortunately.
@Jefffrey Please don't try to explain Monads in a single sentence. It won't make sense to people.
@Unihedro I see?
It's important for IO because, the from the IO monad/box you can't extract the value, so the value is "trapped" inside the box. This prevents "side effect" from polluting non-IO code.
22:08
@Jefffrey Again, this won't make any sense to someone without an FP background.
@FredOverflow lol
Wait, you are not joking?
It's some clever theorem that lead rise to it, only useful in functional fields.
@FredOverflow hmm, think I have watched that one
Java burns down the abstraction so it's the same as everything you already know.
@Unihedro In Java, you can simply say System.out.println or Math.random anywhere. The type system does not help you to control effects. Which is perfectly fine if you have the discipline to control effects yourself.
user1804599
22:13
Monads are useful because you can implement algorithms that work on all monads once.
Eh I am not surprised, the fact that you can do it wrong doesn't mean you can't do it right.
@rightføld That's true for any typeclass.
user1804599
Exactly.
@FredOverflow The real problem is so many global-state APIs.
@rightføld That is correct algorithm-wise, but it doesn't change that everything still works.
22:14
@Puppy Sounds reasonable. Can you back that up with an example?
sure
stdin/stdout/stderr.
filesystem access
environment variables.
user1804599
Just wait for Styx. :P
lots of that shit.
I thought you meant big libraries like OpenGL.
that shit is terrible too.
22:16
lol, half of this room is lounge now
but well
that would not be possible if C did not permit such ridiculous global-state APIs.
28/29 december: the day the lounge conquered the java room
personally I intend to make all globals constant.
@Puppy Every language permits it, but C seems to encourage it more than others.
because handling real state is such a bitch there.
also
there are some standard library API changes you can make that make it easier to avoid.
22:19
How does one hand timeouts on mobile?? halpp!!!
for example, I intend to pass at least stdin/stdout/stderr/env as Main arguments at the very least.
frantically turns on computer
censorship!
@Puppy Did you steal that idea from @rightføld? :)
no.
from memory he was against it too when I suggested it.
user1804599
22:20
We had that idea independently.
user1804599
@Puppy No, I wasn't.
user1804599
I already had it in my mind for a long time, but I never talked about it.
ah
@rightføld Wow, you guys are like Newton and Leibniz.
well
22:20
lol
I think that you don't have to go OMG-side-effects nuts.
but they should be a bit easier to avoid.
user1804599
I intend to pass at least these to main (list is in alphabetical order because I have CDO): command line arguments, environment variables, stderr, stdin, stdout, the directory in which the program was started, the file system, the network, the preferred encoding, the preferred locale, the process ID, the user which started the program.
user1804599
You can only get around it with FFI.
which Wide makes exceptionally easy.
Is there a language that allows you to call a member function with both obj.func(x) and func(obj, x)?
user1804599
22:22
D allows both syntaxes for free functions.
@rightføld Wow, how many parameters does main have in total? :)
@Jefffrey D
Nice
user1804599
@FredOverflow One.
Also Bjarne proposed that for C++.
@FredOverflow The main thingy or the func(obj, x) thingy?
22:23
So who linked this room in room 10?
user1804599
@FredOverflow Passing all of them separately would yield two problems: you have to remember the order and you have to take the ones you don't want to use.
@Jefffrey Depends on how you define "member".
@Unihedro Me
Wide supports that in some circumstances, but it's a bit happenstance.
22:23
What circumstances.
where obj is a module and func is an overloaded function and the calling code is also in the module obj.
@FredOverflow And it got declined?
so something like
@Jefffrey I have no idea about the current state of the proposal.
user1804599
@Jefffrey My current plan for Styx is that x.y, where x is not a module, is the same as (the module in which the type of x was defined).y.
user1804599
22:24
There are no member functions, and every struct field defines a function that acts like a getter (like in Haskell records).
module m { f(arg) {} f(arg1, arg2) {} g(obj) { obj.f(1); f(obj, 1); } }
then pass m as obj.
this is obviously not what you actually intended and it's a bit circumstantial, but technically, it would have the same effect in these oddly specific circumstances.
I wish record syntax was a little better in Haskell.
fge
fge
phew
Well, nasty swt bug
what's swt.
@Puppy Some Java GUI framework or something.
22:27
also
you're a java programmer, stop acting like a human being.
@Puppy I don't understand how this is circumstantial or why does it have ... oh
you are using the module like if it was an object
it is an object.
I see
the Wide analyzer does not support expressions having different meanings in different contexts.
i.e., x.y must always mean the access of a named member of an object.
eh, you learned from the mistakes of C++
user1804599
22:28
And from TypeScript. :P
user1804599
Puppy does Wide have ADL?
it does but it'll likely get the chop or be unused except for C++ interop in the future.
user1804599
If you do it don't make it implicit. :(
ah well
Wide ADL is nowhere near as bad as C++ ADL anyway because it only looks up in the context of the two arguments, not their base classes, their template arguments, their mother's dog's module, etc.
but I'll always need some form of ADL support to support using C++ classes that use ADL.
currently it is only for operators, too.
also only binary operators, I think.
maybe I got around to implementing it for unary operators at some point.
ADL for C++ types is of course regular C++ ADL.
fge
fge
22:46
<-- thought this was the Java chatroom
watching the thymeleaf class I missed
22:59
@fge Just stay still and wait it out
This isn't the first time the lounge regulars hit our room
fge
fge
"lounge regulars"?

Lounge<C++>

Today we're daydreaming about C++26 reflection
(weird people)
what are C people doing in this chat? C people hate Java. (do note tha C people != everyone who programs in C, just the ones who hates everything but C)
;P
@Gemtastic I don't think anybody in the lounge likes C. Well, I like it a little. But not much.
C in this case is collective for the C languages
23:07
Clang, let it be
soo
back to java :D
@Gemtastic How is C++ a "C language", but Java isn't?
Java is built on C. C++ is also built on C. But later versions of Java is built upon older versions of Java.
Therefore, some people consider "Java7" as its own language, and thus "Java8" as its own, which is why you see this notation instead of the typical java-7 and java-8 in tags:
@FredOverflow If you said that, or even hinted to that Java is a C language to the people I refer to as "C people" your head would roll :')
@Gemtastic Anyway, I don't think there is such a thing as "C languages" encompassing more languages than just C.
C++ is not a C language, just like JavaScript is not a Java language.
23:12
@FredOverflow That's not really a good catchphrase, while it's correct.
C, C# and C++ are the ones I know from the "C-family"
Well... You'd be surprised to know they aren't
Well, the joke is that C -> C++ -> C++++ (C#), but no
It's purely based on that C isw in it's name and it's a programming not scripting language
@Gemtastic How is C# more "C-ish" than Java?
@Gemtastic How are scripting languages not programming languages?
@FredOverflow It has a C in it's name. it has nothing to do with the actual language
23:13
oh
Is Ceylon also a C-language? ;)
It could be
@FredOverflow yes
just like fish is an f-word
Does it have to start with C? What about Nice? Or Pascal?
Pascal isn't even a language. It's a joke at best.
Oh, COBOL is definitely a C language by that definition.
23:14
Yes, it is.
// enterprise quality unproductive conversation (TM)
it's just that the people I refer to when I say "C people" are people who programs C, C# or C++ (possibly some other language involving the C) and they were very anti Java when I first sought out what language to learn
@Unihedro Have you ever been productive in a chat room?
@FredOverflow Yes.
amazing
for (var i = 0; i <= 100; i++)
    if (i % 3 != 0)
        if (i % 5 != 0)
            console.log(i);
        else
            console.log('Buzz')
    else if (i % 5 == 0)
        console.log('FizzBuzz')
    else
        console.log('Fizz')
See, I just wrote coder-quality FizzBuzz solution, and in under 10 seconds.
I am a god of all chatters.
23:16
@Gemtastic Every programmer goes through that phase of being against Java. It usually passes.
@FredOverflow probably as they grow older and wiser? ;P
I don't go to those places to chat any more because they were so hateful :(
@Gemtastic As they realize nobody cares if they hate Java or not ;)
People with reddit accounts please help downvote this! reddit.com/r/Bitcoin/comments/2qkmwa/…
I think Java is mostly boring as a programming language, but you can get stuff done in it, and I make money with Java.
@Unihedro Why?
@FredOverflow Because I said please?
23:19
@Unihedro Lounge<Buddha> has taught me not to care about people calling each other names on the Internet.
@FredOverflow Well, it went from -3 to -7 since I linked it, so I'm happy.
@Unihedro Does it get deleted automatically if it passes a certain threshold?
fge
fge
phew Only the Long*Functions left
(and then there are all Operators
learning how to make the html less static
fge
fge
Heh
Files.list(someDir).map(tryWith(Path::toRealPath).or(Path::toAbsolutePath))
23:36
@Gemtastic Static pages are static.
If you want to have it change client-side, write some javascript. If you want more than that, you have to go with PHP.
@Unihedro more like you put stuff into the html to change the content, so the content won't be static
@Gemtastic ... it's still a static page, loads the same no matter which time you query
Well, but the content isn't.
A static web page (sometimes called a flat page/stationary page) is a web page that is delivered to the user exactly as stored, in contrast to dynamic web pages which are generated by a web application. Consequently a static web page displays the same information for all users, from all contexts, subject to modern capabilities of a web server to negotiate content-type or language of the document where such versions are available and the server is configured to do so. Static web pages are often HTML documents stored as files in the file system and made available by the web server over HTTP (...
fge
fge
Isn't ThymeLeaf supposed to solve that kind of problem?
23:38
@fge Yes, and that's what I'm learning
... Oh.
fge
fge
Heh, there are so many templating engines out there for HTML that choosing one is becoming a chore
It's a "new" option instead of JSP
@fge Is that Java 8?
@fge templating engined?
23:40
@fge php :(
fge
fge
@FredOverflow with the help of the library I'm currently developing
so... @fge ... how to run the tests?
fge
fge
@Unihedro you haven't run anything yet? Then the easiest is right click on the test directory and select Run -> all tests (note: TestNG, NOT Junit)
23:43
@fge Yeah, I just write them and hopes they pass, since I have no way of running them on IntelliJ - back on Eclipse there was a plugin that does this
fge
fge
Otherwise there's a "Run" menu
Eh?
Intellij can do this too
Well, I'm so used to Intellij now that I just know how to manipulate it
Otherwise, run ./gradlew test
;)
Well, ./gradlew clean test
23:59
Ok, I've been watching this video for 30 min, and it's only 10min worth of teaching T_T

« first day (1527 days earlier)      last day (3638 days later) »