00:00
atk has quit [Quit: Well this is unexpected.]
00:00
atk has joined #ponylang
00:45
oraoro has quit [Ping timeout: 268 seconds]
01:38
martinium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:19
oraoro has joined #ponylang
03:01
dipin has joined #ponylang
03:12
samuell has quit [Remote host closed the connection]
04:13
_whitelogger has joined #ponylang
04:27
dipin has quit [Quit: dipin]
05:24
martinium has joined #ponylang
06:02
endformationage has quit [Quit: WeeChat 1.9.1]
06:46
martinium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:58
user10032 has joined #ponylang
07:03
user10032 has quit [Quit: Leaving]
07:30
gokr has joined #ponylang
08:00
samuell has joined #ponylang
08:06
vaninwagen has joined #ponylang
08:12
oraoro has quit [Ping timeout: 268 seconds]
08:17
oraoro has joined #ponylang
08:40
samuell has quit [Quit: Leaving]
08:42
benq has joined #ponylang
08:46
codec1 has joined #ponylang
09:39
codec2 has joined #ponylang
09:39
codec1 has quit [Read error: Connection reset by peer]
09:44
bimawa has quit [Quit: WeeChat 1.9.1]
09:48
benq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:49
benq has joined #ponylang
10:23
ShalokShalom has joined #ponylang
10:26
ShalokShalom_ has quit [Ping timeout: 240 seconds]
10:30
_andre has joined #ponylang
11:01
codec2 has quit [Ping timeout: 260 seconds]
11:13
oraoro has quit [Ping timeout: 268 seconds]
12:00
samuell has joined #ponylang
12:00
samuell has quit [Remote host closed the connection]
12:12
codec1 has joined #ponylang
12:51
oraoro has joined #ponylang
13:05
vaninwagen has quit [Ping timeout: 240 seconds]
13:11
dipin has joined #ponylang
13:49
vaninwagen has joined #ponylang
14:15
vaninwagen has quit [Ping timeout: 248 seconds]
14:28
vaninwagen has joined #ponylang
14:49
trevorriles has joined #ponylang
14:59
oraoro has quit [Ping timeout: 248 seconds]
15:00
oraoro has joined #ponylang
15:05
oraoro has quit [Ping timeout: 248 seconds]
15:05
oraoro has joined #ponylang
15:12
oraoro has quit [Ping timeout: 248 seconds]
15:25
oraoro has joined #ponylang
15:30
oraoro has quit [Ping timeout: 248 seconds]
15:42
vaninwagen has quit [Ping timeout: 240 seconds]
16:06
trevorriles has quit [Ping timeout: 268 seconds]
17:02
samuell has joined #ponylang
17:04
gokr has quit [Ping timeout: 240 seconds]
17:30
vaninwagen has joined #ponylang
17:32
codec1 has quit [Ping timeout: 248 seconds]
17:41
vaninwagen has quit [Ping timeout: 258 seconds]
17:45
endformationage has joined #ponylang
18:01
user10032 has joined #ponylang
18:41
codec1 has joined #ponylang
19:25
vaninwagen has joined #ponylang
19:59
_andre has quit [Quit: leaving]
20:37
gokr has joined #ponylang
20:49
jc00ke has joined #ponylang
20:50
<
jc00ke >
Hi there! I'm confounded by trying to `Debug.out` the values of an array, can someone nudge me in the right direction?
20:54
<
jc00ke >
I'm sure it's something simple, but those compiler warnings are confusing me
20:56
<
jc00ke >
file.line() returns a String iso^ and then split returns an Array[String val]
20:57
<
jc00ke >
I figured the compiler would track the String -> Array[String] -> Bool (via Array#contains)
21:03
<
jc00ke >
Oh... when in doubt, google the error message
21:12
<
jc00ke >
I think it's an equality issue... Array#contains default predicate uses is, and I'm guessing I need ==
21:25
<
vaninwagen >
jc00ke, lemme have a look
21:26
vaninwagen has quit [Remote host closed the connection]
21:28
<
codec1 >
your code should works I think
21:28
<
codec1 >
Take a look at this
21:29
<
codec1 >
It mostly what you have written and contains return true for the first case
21:29
<
codec1 >
since ¨2¨ is in the array but return false in the second case since ¨4¨ is not
21:30
vaninwagen has joined #ponylang
21:32
<
jc00ke >
1) that playground loading a gist is freaking awesome
21:32
<
jc00ke >
2) when I used a lambda that compares via == then the code works as expected
21:33
<
jc00ke >
lemme wire it up to the playground
21:33
<
codec1 >
I think I got it
21:33
<
codec1 >
looking at the source code it compare reference instead of values
21:35
<
jc00ke >
Is there a better way to do this?
21:36
<
codec1 >
I agree that the contains method default implementation is rather confusing
21:36
<
codec1 >
About an other you can use a for loop
21:36
<
codec1 >
for a more imperative way
21:37
<
codec1 >
(no pun intented)
21:38
<
jc00ke >
Once I get this challenge done and I refactor it, I'll ask for feedback on how to improve
21:38
<
jc00ke >
Gotta go grab lunch before I pass out. Thanks for taking a look!
21:39
<
codec1 >
you´re welcome
21:42
<
vaninwagen >
it creates a StringBytes(this) where this is an alias, so it is 'String iso!' (i.e. that is equivalent to 'tag') - but StringBytes expects 'box'
21:44
<
vaninwagen >
so the string needs to be sth. that aliases to box (or something that works where box is expected): box, val, ref, iso^ (consumed iso reference)
21:46
jtfmumm_ has joined #ponylang
21:46
jeremyheiler_ has joined #ponylang
21:51
jonrh has quit [Ping timeout: 255 seconds]
21:51
jeremyheiler has quit [Ping timeout: 255 seconds]
21:51
jtfmumm has quit [Ping timeout: 255 seconds]
21:51
jtfmumm_ is now known as jtfmumm
21:51
jeremyheiler_ is now known as jeremyheiler
21:54
<
vaninwagen >
jc00ke i have to admit this behaviour is somewhat surprising, but as the iterator needs to keep a hold on to the original String, it makes very much sense, as we shouldn't leak a reference
21:59
mindB has quit [Ping timeout: 240 seconds]
21:59
M-hrjet has quit [Ping timeout: 255 seconds]
21:59
irx[m] has quit [Ping timeout: 240 seconds]
21:59
dtz has quit [Ping timeout: 240 seconds]
22:00
ada[m] has quit [Ping timeout: 252 seconds]
22:00
srenatus has quit [Ping timeout: 252 seconds]
22:00
lalomartins[m] has quit [Ping timeout: 264 seconds]
22:08
irx[m] has joined #ponylang
22:30
user10032 has quit [Quit: Leaving]
22:31
ada[m] has joined #ponylang
22:31
mindB has joined #ponylang
22:31
dtz has joined #ponylang
22:31
M-hrjet has joined #ponylang
22:31
srenatus has joined #ponylang
22:31
lalomartins[m] has joined #ponylang
22:42
samuell has quit [Quit: Leaving]
22:50
vaninwagen has quit [Ping timeout: 248 seconds]
23:14
codec1 has quit [Read error: Connection reset by peer]
23:43
jonrh has joined #ponylang