Info

Login

Channels

APIs

Credits

  • cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2020-01-13

2020-01-14

2020-01-15 »

Nick Message Date
Pitel [Pitel!~pitel@fw2o.masterinter.net] has joined #kotlin [02:26]
lankanmon [lankanmon!~LKNnet@CPEb4fbe4e331bd-CM64777d632380.cpe.net.cable.rogers.com] has joined #kotlin [02:56]
Tazmainian [Tazmainian!~Tazmain@unaffiliated/tazmain] has joined #kotlin [03:03]
Ladicek [Ladicek!~lthon@109.164.114.141] has joined #kotlin [03:10]
lankanmon [lankanmon!~LKNnet@CPEb4fbe4e331bd-CM64777d632380.cpe.net.cable.rogers.com] has joined #kotlin [03:36]
melatonina [melatonina!uid317528@gateway/web/irccloud.com/x-kdiykokphodljahe] has joined #kotlin [05:30]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined #kotlin [06:11]
OtakuSenpai [OtakuSenpai!~OtakuSenp@unaffiliated/neel] has joined #kotlin [06:54]
intrigus [intrigus!uid114902@gateway/web/irccloud.com/x-deffwgzfpiogtvqp] has joined #kotlin [07:36]
alex88 [alex88!~alex88@unaffiliated/alex88] has joined #kotlin [08:53]
macroprep [macroprep!~brotherco@cpe-172-193-55-193.qld.foxtel.net.au] has joined #kotlin [09:05]
argo_ [argo_!~argo@unaffiliated/argo] has joined #kotlin [09:22]
enriooooooo [enriooooooo!~nanoz@unaffiliated/nanoz] has joined #kotlin [10:16]
enriooooooo how to return Enum value by overriding * operator with integer [10:18]
enriooooooo CustEnum.SEVEN*3 :CustEnum representing 21 as value [10:18]
cheeser fun CustEnum.times(multiplier: Int) = this.value * multiplier [10:19]
enriooooooo isnt that invalid? [10:20]
cheeser tias [10:21]
cheeser Try it and see. You learn much more by experimentation than by asking without having even tried. [10:21]
enriooooooo you must return Enum not Int [10:21]
cheeser *oh* [10:21]
cheeser fun CustEnum.times(multiplier: Int) = CustEnum.valueOf(this.value * multiplier) [10:22]
cheeser i really don't know what you're enum looks like. do you *really* have 21+ values on that enum? [10:22]
enriooooooo Enum has 3 enum vals [10:22]
cheeser trying [10:22]
cheeser What are you trying to do? [10:22]
enriooooooo ONE,TWO,THREE [10:22]
enriooooooo i'm having a class called MyDate [10:23]
enriooooooo and DateEnum with DAY,WEEK,YEAR [10:23]
enriooooooo i want to do mydate+MyEnum.WEEK*3 [10:24]
dreamreal heh [10:24]
enriooooooo 3 weeks + the current date returns the date [10:24]
enriooooooo overrided plus [10:25]
enriooooooo on overriding times i got a doubt how to return Enum :( [10:25]
cheeser then whay would you want an enum after that multiplication? [10:25]
dreamreal why would you want an enum? It sounds like you want a date [10:25]
dreamreal "returns a date" seems like a clue [10:26]
enriooooooo well im learning and this was an assignment i downloaded from online course [10:26]
enriooooooo spent couple of hours on this not able to figureout [10:27]
enriooooooo how can i return Enum :( [10:27]
Diablo-D3 I hope you didnt pay money for that course [10:27]
enriooooooo ) [10:27]
cheeser what are the requirements for this particular bit of code that you're trying to write? [10:27]
Diablo-D3 you're also asking a very simple question [10:27]
enriooooooo simple? [10:28]
dreamreal yes [10:28]
dreamreal your requirements are ... not good but the questions you're asking are very simple [10:28]
Diablo-D3 enums are a special type of class [10:29]
enriooooooo yes [10:29]
Diablo-D3 https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html [10:29]
Diablo-D3 Diablo-D3's title: "Enum Types (The Java Tutorials > Learning the Java Language > Classes and Objects)" [10:29]
cheeser eyes Diablo-D3 [10:29]
dreamreal This is kotlin, Diablo-D3 [10:30]
Diablo-D3 oh, so it is [10:30]
Diablo-D3 then again, its not like kotlin is functionally different here [10:31]
dreamreal sure, but provide the kotlin references, please, you freaking dork [10:31]
Diablo-D3 https://kotlinlang.org/docs/reference/enum-classes.html [10:31]
Diablo-D3 Diablo-D3's title: "Enum Classes - Kotlin Programming Language" [10:31]
dreamreal see? even brilliant people like you can manage it! [10:31]
dreamreal enriooooooo: anyway, the biggest problem is the requirements, as expressed [10:32]
dreamreal you know how to do operator overloading, or want to: the information's there [10:32]
dreamreal you want to declare an enum with overloaded operators: the information's there [10:33]
dreamreal you want to add a date as calculated with a value from an enum: the information's there [10:33]
enriooooooo Enum.WEEK * 3 must return 3*ENUM which i dont know :( [10:39]
dreamreal why would it return 3*ENUM [10:40]
enriooooooo because the definition needs Enum as return type [10:42]
dreamreal why [10:43]
enriooooooo i dont know why [10:44]
enriooooooo may be you can do it and submit the solution [10:44]
dreamreal maybe I could, but... uh [10:46]
cheeser are you asking us to cheat for you? because that's a good way to exit here. [10:54]
DTZUZO [DTZUZO!~DTZUZO@205.ip-149-56-132.net] has joined #kotlin [10:59]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined #kotlin [11:00]
enriooooooo https://pastebin.com/aSaAz160 [11:01]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined #kotlin [11:47]
intrigus [intrigus!uid114902@gateway/web/irccloud.com/x-gxcrlvhlulhnrvtv] has joined #kotlin [12:12]
orbyt_v7 [orbyt_v7!~textual@172.92.5.20] has joined #kotlin [12:29]
orbyt_v7 [orbyt_v7!~textual@172.92.5.20] has joined #kotlin [12:34]
zutat [zutat!02f32e84@unaffiliated/zutat] has joined #kotlin [12:56]
vimclippy [vimclippy!~vimclippy@104.244.76.234] has joined #kotlin [01:07]
Death916 [Death916!~Nick@unaffiliated/death916] has joined #kotlin [01:20]
_xor [_xor!~xor@74.215.46.133] has joined #kotlin [01:34]
_xor [_xor!~xor@74.215.46.133] has joined #kotlin [02:50]
aaronbond [aaronbond!~shrewdy@2a03:2880:11ff:18::face:b00c] has joined #kotlin [03:16]
alex88 [alex88!~alex88@unaffiliated/alex88] has joined #kotlin [03:37]
iam730 [iam730!~iam730@104.143.92.169] has joined #kotlin [03:52]
intrigus [intrigus!uid114902@gateway/web/irccloud.com/x-inkkxmujkonvngrs] has joined #kotlin [04:06]
orbyt_v7 [orbyt_v7!~textual@172.92.5.20] has joined #kotlin [05:45]
Nick_ [Nick_!~Nick@unaffiliated/death916] has joined #kotlin [06:51]
orbyt_v7 [orbyt_v7!~textual@128.177.170.122] has joined #kotlin [07:04]
melatonina [melatonina!uid317528@gateway/web/irccloud.com/x-sudympaitjvozgyc] has joined #kotlin [07:45]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined #kotlin [08:33]
enriooooooo [enriooooooo!~nanoz@unaffiliated/nanoz] has joined #kotlin [09:54]
Nick_ [Nick_!~Nick@unaffiliated/death916] has joined #kotlin [10:36]
enriooooooo [enriooooooo!~nanoz@unaffiliated/nanoz] has joined #kotlin [11:28]