00:14
<
havenwood >
The Ruby extension in Crystal proof of concept got me wanting to embed MRuby in a Crystal Ruby extension. Ruby in your Crystal in your Ruby if you will.
00:14
<
jhass >
logo could get tricky
00:16
sadin has joined #crystal-lang
00:17
<
havenwood >
I have no clue what I'm doing. Just stabbing at it until it seemingly works. >.> Was curious for any feedback! ;)
00:18
<
havenwood >
I was just stoked it worked!
00:18
<
jhass >
I know that feeling
00:20
sadin has quit [Ping timeout: 256 seconds]
00:32
<
Flaise >
Stupid question: what's csfml?
00:33
<
jhass >
the c api to SFML
00:43
<
a5i >
is Crystal was available for windows
00:43
<
a5i >
would that lib work for it?
00:45
<
jhass >
likely, probably some minor adjustments but its a crossplatform lib after all
00:45
havenwood has quit [Ping timeout: 240 seconds]
00:46
havenwood has joined #crystal-lang
00:47
ismaelga has quit [Remote host closed the connection]
00:52
<
a5i >
well I really want windows version now :P
00:53
<
jhass >
dunno, I don't need windows for anything
00:54
<
a5i >
I do since thats the OS I have atm
01:02
<
a5i >
jhass, do u remember who made lwan C library ?
01:02
<
a5i >
the really fast http lib
01:02
<
jhass >
no, I suck at remembering names
01:47
havenn has joined #crystal-lang
01:49
havenwood has quit [Ping timeout: 264 seconds]
01:53
havenn has quit [Ping timeout: 264 seconds]
01:53
havenwood has joined #crystal-lang
02:12
<
Flaise >
jhass: Oh, that. I knew about SFML but I didn't realize there was a separate name for the C version.
02:12
<
Flaise >
Used it before. It's not amazing but it's ok for simple projects, at least. Never made anything complex with it.
02:46
<
a5i >
>> #a5i's stuff
03:15
<
a5i >
jhass, it was sadin :P
03:32
havenn has joined #crystal-lang
03:35
havenwood has quit [Ping timeout: 248 seconds]
03:44
havenwood has joined #crystal-lang
03:46
havenn has quit [Ping timeout: 240 seconds]
04:15
leafybasil has quit [Remote host closed the connection]
04:21
shama has quit [Remote host closed the connection]
04:22
shama has joined #crystal-lang
04:29
JBat has joined #crystal-lang
05:12
havenwood has quit [Remote host closed the connection]
05:22
BlaXpirit has joined #crystal-lang
05:26
JBat has quit [Quit: Computer has gone to sleep.]
05:31
sandelius has joined #crystal-lang
05:37
Flaise has quit [Quit: Leaving.]
05:38
DerisiveLogic has joined #crystal-lang
05:53
a5i has quit [Quit: Connection closed for inactivity]
05:58
canhtak has joined #crystal-lang
06:03
barosl__ has quit [Quit: Leaving]
06:08
canhtak has quit [Quit: canhtak]
06:11
shama has quit [Remote host closed the connection]
06:15
canhtak has joined #crystal-lang
06:18
DerisiveLogic has quit [Ping timeout: 245 seconds]
06:38
waterlink has joined #crystal-lang
06:55
Ven has joined #crystal-lang
07:02
sadin has joined #crystal-lang
07:04
sadin has quit [Client Quit]
07:04
waterlink has quit [Ping timeout: 264 seconds]
07:13
shama has joined #crystal-lang
07:17
shama has quit [Ping timeout: 245 seconds]
07:33
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:36
Ven has joined #crystal-lang
07:43
<
BlaXpirit >
how to handle out-arguments in object wrapper?
07:44
<
BlaXpirit >
I used to do CSFML.window_poll_event(window, out event)
07:44
<
BlaXpirit >
how to wrap it?
07:44
canhtak has quit [Quit: canhtak]
07:49
<
jhass >
def poll_event; CSFML.window_poll_event(@this, out event); Event.new(event); end; I guess?
07:50
<
BlaXpirit >
jhass, oh but it also returns bool
07:50
<
BlaXpirit >
i'd really like to keep the out-semantics
07:50
Ven has joined #crystal-lang
07:50
<
jhass >
what does the bool mean?
07:51
<
BlaXpirit >
while CSFML.render_window_poll_event(window, out event) != 0: deal with event
07:51
<
jhass >
okay, give me a minute
07:54
<
jhass >
if the caller wants to stop earlier he just calls break
07:55
<
jhass >
and you could add a convenience method that just return a single one
07:55
<
BlaXpirit >
this is just one case
07:55
<
BlaXpirit >
here's more: intersects(rect1, rect2, out intersection): bool
07:56
<
BlaXpirit >
well yeah, that's actually obvious
07:56
<
BlaXpirit >
just that it requires manual intervention
07:57
<
jhass >
that one I'd wrap as returning the intersection or nil if there's none
07:57
<
BlaXpirit >
yes, yes
08:15
canhtak has joined #crystal-lang
08:26
ponga has joined #crystal-lang
08:34
ponga has quit [Remote host closed the connection]
08:38
Ven has quit [Read error: Connection reset by peer]
08:38
Ven has joined #crystal-lang
09:14
JBat has joined #crystal-lang
09:20
Ven has quit [Ping timeout: 264 seconds]
09:29
<
jhass >
I can confirm, are you on llvm 3.6 or 3.5?
09:29
<
BlaXpirit >
i dont know
09:29
<
BlaXpirit >
3.5.1 apparently
09:31
<
jhass >
okay, you may want to compile a compiler with bin/crystal build --debug src/compiler/crystal.cr -o debug_crystal and then valgrind (or gdb/lldb) debug_crystal build simple.cr and open an issue with the trace
09:35
ponga has joined #crystal-lang
09:35
<
BlaXpirit >
also: Error while requiring "prelude": can't find file 'prelude'
09:36
<
jhass >
that's when doing what exactly?
09:36
<
BlaXpirit >
when just running that debug_crystal
09:36
<
BlaXpirit >
instead of crystal, as normal
09:36
<
jhass >
ah, mh, weird that it didn't happen for me
09:37
<
jhass >
CRYSTAL_PATH="/path/to/crystal/src:libs" debug_crystal # try invoking it like that
09:39
ponga has quit [Ping timeout: 264 seconds]
09:41
<
jhass >
btw small style note: you can should just omit empty parens ()
09:52
<
jhass >
so it recurses endlessly somehwere
10:16
canhtak has quit [Quit: canhtak]
10:57
ponga has joined #crystal-lang
11:02
canhtak has joined #crystal-lang
11:22
canhtak has quit [Quit: canhtak]
11:25
canhtak has joined #crystal-lang
11:25
Ven has joined #crystal-lang
11:33
canhtak has quit [Quit: canhtak]
11:36
a5i has joined #crystal-lang
11:55
canhtak has joined #crystal-lang
12:03
DerisiveLogic has joined #crystal-lang
12:03
<
a5i >
>> "Hello World".to_a
12:03
<
DeBot >
a5i: Error in line 3: undefined method 'to_a' for String (did you mean 'to_i'?)
12:04
<
a5i >
>> "Hello World".split(" ")
12:04
<
DeBot >
a5i: ["Hello", "World"]
12:05
canhtak has quit [Quit: canhtak]
12:08
DerisiveLogic has quit [Ping timeout: 272 seconds]
12:32
canhtak has joined #crystal-lang
12:47
shama has joined #crystal-lang
12:50
ponga has quit [Quit: Leaving...]
12:52
shama has quit [Ping timeout: 245 seconds]
13:26
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:27
ismaelga has joined #crystal-lang
13:35
Ven has joined #crystal-lang
13:48
canhtak has quit [Quit: canhtak]
13:51
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:53
ponga has joined #crystal-lang
13:56
canhtak has joined #crystal-lang
13:58
Ven has joined #crystal-lang
14:03
DeBot has quit [Ping timeout: 272 seconds]
14:06
canhtak has quit [Quit: canhtak]
14:06
ismaelga has quit [Remote host closed the connection]
14:06
havenwood has joined #crystal-lang
14:07
canhtak has joined #crystal-lang
14:11
canhtak has quit [Client Quit]
14:17
JBat has quit [Ping timeout: 240 seconds]
14:20
ismaelga has joined #crystal-lang
14:20
JBat has joined #crystal-lang
14:28
Flaise has joined #crystal-lang
14:30
havenwood has quit []
14:32
havenwood has joined #crystal-lang
14:48
canhtak has joined #crystal-lang
14:52
canhtak has quit [Client Quit]
14:54
canhtak has joined #crystal-lang
14:56
asterite has joined #crystal-lang
15:03
canhtak has quit [Quit: canhtak]
15:04
canhtak has joined #crystal-lang
15:05
canhtak has quit [Client Quit]
15:05
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:19
shama has joined #crystal-lang
15:23
shama has quit [Ping timeout: 245 seconds]
15:46
Ven has joined #crystal-lang
15:50
DerisiveLogic has joined #crystal-lang
15:54
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:56
DerisiveLogic has quit [Ping timeout: 272 seconds]
16:17
shama has joined #crystal-lang
16:22
DerisiveLogic has joined #crystal-lang
16:32
<
BlaXpirit >
as i understand it, strings are converted to UTF-8 when passing to PCRE
16:33
<
BlaXpirit >
why not use the UTF-32 option?
16:33
<
asterite >
Strings in crystal are UTF-8
16:33
<
BlaXpirit >
oh really
16:33
<
BlaXpirit >
i thought i saw somewhere explicitly saying they're utf-32
16:34
<
asterite >
Yes. Right now this is not checked when you create a string for bytes, but we could eventually do that (it does raise if you iterate or index the string and it's not valid utf-8)
16:34
<
BlaXpirit >
oh it's Char, and String doc is empty
16:34
<
BlaXpirit >
ok so how is this handled in standard library?
16:34
<
BlaXpirit >
chars returns an array of chars
16:35
<
BlaXpirit >
is there a lazy/iterator?
16:35
<
BlaXpirit >
wait what. char actually contains UTF-8? that seems really weird
16:36
<
asterite >
Char is just four bytes like an Int32, representing a codepoint
16:36
<
BlaXpirit >
waait a second
16:36
<
asterite >
Right now there's no lazy iterator for chars... well, you can do "hello".each_char { ... }, but that's not a real iterator
16:36
<
BlaXpirit >
UTF-8 is not just a codepoint
16:36
<
asterite >
However, in the "iterator' branch there is one. I just need to check with waj if he agrees with that, and we'll merge it to master :)
16:37
<
asterite >
Or maybe code unit, I mix them
16:37
<
BlaXpirit >
so can you tell me, what is actually stored in Char?
16:37
<
BlaXpirit >
one codepoint encoded to UTF-8 or just one codepoint as integer
16:38
<
asterite >
For example
16:38
<
asterite >
DeBot: 'a'
16:38
<
asterite >
>> 'a'.ord
16:38
<
asterite >
DeBot: 97
16:38
<
asterite >
(assuming DeBot is alive)
16:39
<
asterite >
A char is just a number but treated as another type. I think other languages call it Rune
16:39
<
BlaXpirit >
ord('я').to_bytes(4, 'little') == b'O\x04\x00\x00'
16:39
<
BlaXpirit >
'я'.encode('utf-8') == b'\xd1\x8f'
16:40
<
BlaXpirit >
'я'.encode('utf-32-le') == b'O\x04\x00\x00'
16:40
<
asterite >
You can try this in crystal: puts 'я'.bytes
16:41
<
BlaXpirit >
this is Python code demonstrating that one could say that UTF-32 is the same thing as codepoints
16:41
<
BlaXpirit >
>> puts 'я'.bytes
16:41
<
BlaXpirit >
>> 'я'.bytes
16:41
<
asterite >
DeBot is sleeping :(
16:42
<
asterite >
Oh, the docs there say "A char literal is enclosed with single quotes and contains a character encoded in UTF-8"
16:42
<
asterite >
It's talking about a char literal, not the char type
16:42
<
BlaXpirit >
oh right, i didnt notice that you impersonated it :p
16:42
<
Flaise >
That confused me too xD
16:42
<
BlaXpirit >
oh yeah, that is true, it's actually correct, asterite
16:42
<
asterite >
Really? :-)
16:42
<
BlaXpirit >
still confusing as heck
16:43
<
asterite >
I plan to remove that documentation about types from there and just leave it in the types
16:43
<
asterite >
so it's easier to maintain
16:44
<
BlaXpirit >
'я'.bytes gives UTF-8... not what i expected, but i don't know what else it would be
16:46
<
asterite >
Right now the standard library assumes UTF-8 everywhere, we still need to add support for other encodings
16:46
<
BlaXpirit >
it's fine
16:47
<
asterite >
Maybe we can have Char#to_bytes(encoding) or something
16:47
<
BlaXpirit >
of course that would be best
16:47
<
BlaXpirit >
are there bytestrings of some sort?
16:47
<
BlaXpirit >
ah, maybe to manipulate bytes you gotta do String.to_bytes
16:48
<
BlaXpirit >
gotta see how pcre result gets translated to position in string
16:48
<
asterite >
csfml uses UTF-32?
16:49
<
BlaXpirit >
it's not really that, it just accepts codepoints
16:49
<
BlaXpirit >
to not deal with encodings
16:49
<
asterite >
interesting
16:49
<
BlaXpirit >
but it also has UTF-X support, which is not part of CSFML
16:50
<
BlaXpirit >
and by X i mean 8,16,32
16:50
DeBot has joined #crystal-lang
16:50
<
BlaXpirit >
asterite, so have you seen that compiler crash dump i sent?
16:51
<
BlaXpirit >
i'm completely stumped
16:54
<
asterite >
Not yet. I don't know what happenes, but from yesterday to today there were many new issues in github
16:54
<
asterite >
and now I've got some work to do (in erlang, yay!)
16:55
<
asterite >
But I'll definitely look at it later. It appears to be a stack overflow in the semantic phase
16:56
<
asterite >
I don't know, we'll first have to find the limitations of the current one
16:56
<
BlaXpirit >
what do u mean, "limitations"
16:56
<
BlaXpirit >
it can only match.....
16:56
<
BlaXpirit >
of course that's a huge limitation
16:58
<
jhass >
there's scan
16:58
<
jhass >
there's \A & \z
16:59
<
jhass >
I think you can get the pos of a match, at least that should be easy to expose
16:59
<
jhass >
split takes a regex too
16:59
<
jhass >
there's sub & gsub
17:00
<
jhass >
there's Regex.escape & Regex.union
17:00
<
jhass >
anything else you need?
17:00
<
BlaXpirit >
well see, i have no idea where all that stuff is
17:00
<
asterite >
It's mostly in String and Regex, but not everything is documented yet :(
17:01
<
BlaXpirit >
it is not really usable
17:01
<
jhass >
>> "foo"[/f(o)o/, 1]
17:01
<
asterite >
Another think you can do is look at Ruby docs for String and Regex... most of it is the same in crystal
17:01
<
jhass >
>> "foo"[/oo/] = "aa"
17:01
<
DeBot >
jhass: Error in line 3: undefined method '[]=' for String
17:02
<
jhass >
>> "foo".sub /oo/, "aa"
17:02
<
DeBot >
jhass: Error in line 3: undefined method 'sub' for String (did you mean 'gsub'?)
17:02
<
asterite >
Oh, DeBot is back :)
17:02
<
jhass >
okay, we still gotta expose some things
17:02
<
asterite >
No sub yet, but it should be easy to do :)
17:02
<
jhass >
yeah and String#[]=(Regex, String) should delegate to it
17:03
<
BlaXpirit >
"foo".split /o/
17:03
<
BlaXpirit >
>> "foo".split /o/
17:03
<
DeBot >
BlaXpirit: ["f", ""]
17:03
<
ponga >
is there downloadable irb equivalent of crystal
17:04
<
asterite >
Mmm.. I don't think we'll have []= as strings are immutable
17:04
<
jhass >
forgot about that
17:05
<
jhass >
>> "foo\nbar".match(/\Abar\z/)
17:05
BlaXpirit_ has joined #crystal-lang
17:06
<
asterite >
>> "foo\nbar".match(/\Abar\z/m)
17:06
<
DeBot >
asterite: nil
17:06
<
asterite >
>> "foo\nbar".match(/\Abar\Z/m)
17:06
<
DeBot >
asterite: nil
17:06
<
jhass >
that's working right
17:06
<
asterite >
Ah, ok :)
17:06
<
BlaXpirit_ >
>> "word word".split /\b/
17:06
<
DeBot >
BlaXpirit_: Sorry, that took too long.
17:06
<
BlaXpirit_ >
yyup, typical error
17:07
<
jhass >
>> "1\n\2\3\n4".scan /\d+/
17:07
<
DeBot >
jhass: [#<MatchData:0x994BFE0 @regex=/\d+/, @code=Pointer(Void)@9948F78, @string="1\n\u{2}\u{3}\n4", @pos=0, @ovector=Pointer(Int32)@994AFC0, @length=0>, #<MatchData:0x994BFC0 @regex=/\d+/, @code=Pointer(Void)@9948F78, @string="1\n\u{2}\u{3}\n4", @pos=1, @ovector=Pointer(Int32)@994AF88, @length=0>]
17:07
<
jhass >
>> "1\n\2\3\n4".scan /\d+/, &.[0]
17:07
<
DeBot >
jhass: "1\n\u{2}\u{3}\n4"
17:07
<
BlaXpirit_ >
i'm sorry to say, but i have some tests that will screw this regex implementation :|
17:07
<
jhass >
it's libpcre
17:08
<
BlaXpirit_ >
>> "word word".split /\b/
17:08
<
DeBot >
BlaXpirit_: Sorry, that took too long.
17:08
BlaXpirit has quit [Ping timeout: 252 seconds]
17:08
<
BlaXpirit_ >
this is not correct
17:08
<
ponga >
im still stoned staring at regex
17:08
<
ponga >
i should practise more
17:08
<
asterite >
We can always change the regex implementation, the important thing is to build the api that we want
17:08
<
jhass >
yeah, it hangs for some reason
17:08
<
BlaXpirit_ >
the reason is it advances by length of the match
17:09
<
BlaXpirit_ >
which is 0
17:09
<
BlaXpirit_ >
>> "abc".split //
17:09
<
DeBot >
BlaXpirit_: Sorry, that took too long.
17:13
<
Flaise >
>> 'я'.bytes
17:13
<
DeBot >
Flaise: [209, 143]
17:13
<
Flaise >
'я'.encode('utf-8')
17:14
<
Flaise >
>> 'я'.encode('utf-8')
17:14
<
DeBot >
Flaise: Syntax error in eval:3: unterminated char literal
17:14
<
Flaise >
>> 'я'.encode("utf-8")
17:14
<
DeBot >
Flaise: Error in line 3: undefined method 'encode' for Char
17:14
<
jhass >
BlaXpirit_: actually looks like it's fixed in head
17:14
<
jhass >
well, kinda, it doesn't split correctly but it doesn't hang
17:16
<
BlaXpirit_ >
you did echo | crystal eval didnt u?
17:17
<
BlaXpirit_ >
if u put it properly in a file, it hangs
17:17
<
Flaise >
>> "я".encode("utf-8")
17:17
<
DeBot >
Flaise: Error in line 3: undefined method 'encode' for String
17:17
<
BlaXpirit_ >
Flaise, quit trying, it was Python code
17:19
<
asterite >
Yeah, it's not working well. I think there was another case where it hanged, and I fixed that
17:19
<
asterite >
but apparently the semantic is not well in those cases. Needs a couple more specs and a fix ;-)
17:20
ponga has quit [Remote host closed the connection]
17:20
asterite has quit [Quit: Page closed]
17:20
<
BlaXpirit_ >
oh, i accidentally used last release
17:21
<
BlaXpirit_ >
now it's wrong in a different way, indeed
17:29
ponga has joined #crystal-lang
17:33
a5i has quit [Quit: Connection closed for inactivity]
17:43
ismaelga has quit [Remote host closed the connection]
17:44
a5i has joined #crystal-lang
18:12
BlaXpirit_ has quit [Quit: Quit Konversation]
18:12
BlaXpirit has joined #crystal-lang
18:27
ponga has quit [Quit: Leaving...]
19:10
rpag has joined #crystal-lang
19:12
rpag has quit [Remote host closed the connection]
19:20
JBat has quit [Quit: Computer has gone to sleep.]
19:21
havenwood has quit [Ping timeout: 276 seconds]
19:22
colorados has quit [Ping timeout: 246 seconds]
19:24
DerisiveLogic has quit [Ping timeout: 264 seconds]
19:26
colorados has joined #crystal-lang
19:42
rpag has joined #crystal-lang
20:12
canhtak has joined #crystal-lang
20:28
bcardiff has joined #crystal-lang
20:29
ismaelga has joined #crystal-lang
20:42
DerisiveLogic has joined #crystal-lang
21:00
DerisiveLogic has quit [Ping timeout: 250 seconds]
21:03
ponga has joined #crystal-lang
21:23
asterite has joined #crystal-lang
21:23
<
asterite >
BlaXpirit: are you there?
21:25
<
asterite >
I'll ask the designer, but right now he's offline
21:25
ponga has quit [Remote host closed the connection]
21:25
<
BlaXpirit >
asterite, hi
21:26
canhtak has quit [Ping timeout: 276 seconds]
21:28
<
BlaXpirit >
asterite, so u should do something to the other issue
21:28
canhtak has joined #crystal-lang
21:28
<
asterite >
As a workaround you can do: `x2 = x ? pointerof(x) : nil` and continue using x2
21:28
<
asterite >
What other issue?
21:29
canhtak has quit [Client Quit]
21:29
<
asterite >
Oh! I forgot you put it in github, sorry. I'll relate them both
21:30
ismaelga has quit []
21:35
<
BlaXpirit >
welp, i can't take address of it anyway
21:37
<
BlaXpirit >
copying seems to work
21:37
<
BlaXpirit >
ok, thanks. i can proceed now
21:45
<
asterite >
BlaXpirit: seems someone is interested in your bindings ;-)
21:45
<
BlaXpirit >
argument 'window' of 'CSFML#window_get_settings' must be CSFML::Window, not CSFML::Window?
21:47
<
jhass >
Foo? is short for Foo|Nil
21:47
<
asterite >
Oh, I guess nil should pass there
21:47
<
BlaXpirit >
there are 2 problems here
21:47
<
asterite >
Instead of nil you can try doing Pointer(...).null. I think Window.null should work, let me try
21:47
<
BlaXpirit >
nil should indeed pass there, and also it can actually never be nill
21:48
<
BlaXpirit >
although maybe it assumes the function can return a null pointer
21:48
<
BlaXpirit >
I always assign @this in every initialize
21:49
<
BlaXpirit >
and then use it here, and it says it's "CSFML::Window?"
21:51
<
asterite >
I can't try it because with the old compiler it crashes, and with the new one it says the error about the recursive pointerof
21:53
<
BlaXpirit >
ok, I updated it if you wanna try
21:55
<
asterite >
Oh, I found it
21:55
<
asterite >
You are doing `if settings` but should be `if psettings`
21:55
<
asterite >
The first one is invoking the "settings" method
21:56
<
asterite >
and that uses @this, which at that point wasn't initialized, so the compiler assumes it's nil
21:56
<
asterite >
Also by the trace, you can see that the compiler tried to type the "settings" method from "new"
21:56
<
BlaXpirit >
daaamn that's stupid, sorry
21:56
<
asterite >
(but, of course, we are always trying to make errors more obvious and friendly)
21:57
<
asterite >
Nah, it's a subtle error
21:58
<
crystal-gh >
crystal/master d619010 Ary Borenszweig: Fixed #548: is_a?(A | B) didn't work well when both A and B extended another class
21:58
<
crystal-gh >
crystal/master 0d8c3d4 Ary Borenszweig: Fixed #551, fixed #553: detect recursive pointeof expansion
21:58
<
crystal-gh >
crystal/master 0af4359 Ary Borenszweig: Support LLVM 3.6, and search for `llvm36` in homebrew to use in the path instead of `llvm`
22:04
asterite has quit [Quit: Page closed]
22:09
<
travis-ci >
manastech/crystal#2245 (master - 0d8c3d4 : Ary Borenszweig): The build has errored.
22:26
ponga has joined #crystal-lang
22:30
ponga has quit [Ping timeout: 250 seconds]
22:42
canhtak has joined #crystal-lang
22:47
canhtak has quit [Ping timeout: 264 seconds]
23:15
havenwood has joined #crystal-lang
23:16
DerisiveLogic has joined #crystal-lang
23:20
wandere_ has joined #crystal-lang
23:20
wandere_ is now known as wanderer_
23:21
wanderer_ has left #crystal-lang [#crystal-lang]
23:21
wanderer_ has joined #crystal-lang
23:26
ponga has joined #crystal-lang
23:29
havenwood has quit []
23:32
ponga has quit [Ping timeout: 264 seconds]
23:46
wanderer_ has quit [Quit: Page closed]
23:54
<
a5i >
>> "<title> hello </title>\n<title> world </title>".scan(/<title>(.*?)<\/title>/)
23:54
<
DeBot >
a5i: [#<MatchData:0x973DFE0 @regex=/<title>(.*?)<\/title>/, @code=Pointer(Void)@973BF70, @string="<title> hello </title>\n<title> world </title>", @pos=0, @ovector=Pointer(Int32)@973BF08, @length=1>, #<MatchData:0x973DFC0 @regex=/<title>(.*?)<\/title>/, @code=Pointer(Void)@973BF70, @string="<title> hello </title>\n<title> world </title>", @pos=22, @ovec ...
23:54
<
crystal-gh >
crystal/master d7c311c Ary Borenszweig: Fixed several cases of `String#split(Regex)`, and also improved MatchData#to_s and #inspect
23:55
<
a5i >
>> "<title> hello </title>\n<title> world </title>".scan(/<title>(.*?)<\/title>/).to_s
23:55
<
DeBot >
a5i: "[#<MatchData:0x8378FE0 @regex=/<title>(.*?)<\\/title>/, @code=Pointer(Void)@8376F70, @string=\"<title> hello </title>\\n<title> world </title>\", @pos=0, @ovector=Pointer(Int32)@8376F08, @length=1>, #<MatchData:0x8378FC0 @regex=/<title>(.*?)<\\/title>/, @code=Pointer(Void)@8376F70, @string=\"<title> hello </title>\\n<title> world </title>\", @pos= ...
23:55
<
a5i >
Is that just some weird coincidence ?!
23:55
asterite has joined #crystal-lang
23:55
<
a5i >
>> puts "<title> hello </title>\n<title> world </title>".scan(/<title>(.*?)<\/title>/)
23:56
<
DeBot >
a5i: [#<MatchData:0x9C17FE0 @regex=/<title>(.*?)<\/title>/, @code=Pointer(Void)@9C15F70, @string="<title> hello </title>\n<title> world </title>", @pos=0, @ovector=Pointer(Int32)@9C15F08, @length=1>, #<MatchData:0x9C17FC0 @regex=/<title>(.*?)<\/title>/, @code=Pointer(Void)@9C15F70, @string="<title> hello </title>\n<title> world </title>", @pos=22, @ovec ...
23:56
<
a5i >
asterite: ^ :[
23:56
<
asterite >
Yes, I just improved that
23:56
<
asterite >
There was a discussion about regex previously in the day, I decided to tackle the problems :)
23:56
<
a5i >
it is a coincidence !
23:56
<
asterite >
But you'll have to wait for the next release for that to appear nicely... or compile yourself a compiler ;-)
23:56
<
a5i >
I did that, then right after the spit output crystal-gh popped up
23:56
<
a5i >
I can't do the latter
23:57
<
a5i >
how long do I have to wait :(
23:57
<
asterite >
Maybe a week or two, we'll see
23:57
<
asterite >
Gotta go...
23:57
asterite has quit [Client Quit]