00:05
Philpax has joined #crystal-lang
00:07
vikaton has quit [Quit: Connection closed for inactivity]
00:18
soveran has joined #crystal-lang
00:19
trapped has quit [Read error: Connection reset by peer]
00:23
soveran has quit [Ping timeout: 240 seconds]
00:42
snsei has quit [Remote host closed the connection]
00:44
ozra_ has quit [Ping timeout: 250 seconds]
01:09
snsei has joined #crystal-lang
01:19
bjhaid has joined #crystal-lang
01:26
bjhaid has quit [Ping timeout: 250 seconds]
01:28
snsei has quit [Remote host closed the connection]
01:29
mgarciaisaia has joined #crystal-lang
01:29
mgarciaisaia has left #crystal-lang [#crystal-lang]
01:58
icezimm has quit [Quit: Leaving.]
02:02
Raimondii has joined #crystal-lang
02:03
sebasr has quit [Remote host closed the connection]
02:05
Raimondi has quit [Ping timeout: 240 seconds]
02:05
Raimondii is now known as Raimondi
02:09
sebasr has joined #crystal-lang
03:21
soveran has joined #crystal-lang
03:26
soveran has quit [Ping timeout: 246 seconds]
03:43
mgarciaisaia has joined #crystal-lang
03:44
mgarciaisaia has quit [Client Quit]
04:02
jroh has quit [Ping timeout: 260 seconds]
04:06
snsei has joined #crystal-lang
04:49
matp has quit [Remote host closed the connection]
04:50
matp has joined #crystal-lang
04:51
pawnbox has joined #crystal-lang
04:54
pawnbox has quit [Remote host closed the connection]
05:18
pawnbox has joined #crystal-lang
05:22
soveran has joined #crystal-lang
05:28
soveran has quit [Ping timeout: 260 seconds]
05:30
vikaton has joined #crystal-lang
05:41
snsei has quit [Remote host closed the connection]
05:49
buggs2 has joined #crystal-lang
05:51
buggs1 has quit [Ping timeout: 258 seconds]
06:02
<
vikaton >
how is crystal lang windows support coming along?
06:22
<
txdv >
two 1 year old commits
06:24
snsei has joined #crystal-lang
06:28
snsei has quit [Ping timeout: 250 seconds]
06:34
Philpax has quit [Ping timeout: 252 seconds]
06:40
soveran has joined #crystal-lang
06:42
<
jhass >
nobody is actively working on it as far as I'm aware
07:07
<
Davy_CC >
llvm need to upgrades for supporting windows' error handling T_T
07:07
<
jhass >
LLVM needs to update. Period, no further reasoning necessary ;)
07:19
bjz has joined #crystal-lang
07:25
snsei has joined #crystal-lang
07:27
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
07:30
snsei has quit [Ping timeout: 246 seconds]
07:36
bjz has joined #crystal-lang
07:36
pawnbox has quit [Remote host closed the connection]
07:39
trapped has joined #crystal-lang
07:40
pawnbox has joined #crystal-lang
07:41
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
07:44
bjz has joined #crystal-lang
07:58
Philpax has joined #crystal-lang
08:42
pawnbox has quit [Remote host closed the connection]
08:42
mark_66 has joined #crystal-lang
08:50
pawnbox has joined #crystal-lang
08:52
dom96 has quit [Changing host]
08:52
dom96 has joined #crystal-lang
08:53
<
crystal-gh >
crystal/master b04b467 Julien Portalier: Socket.ip?(str) to validate IPv4 and IPv6 addresses
08:53
<
crystal-gh >
crystal/master f050e96 Julien Portalier: Legacy hostname validation for OpenSSL < 1.0.2
08:53
<
crystal-gh >
crystal/master 0090da1 Julien Portalier: OpenSSL: basic X509 certificate support
08:56
bjz has quit [Ping timeout: 276 seconds]
08:56
crack08 has joined #crystal-lang
08:57
bjz has joined #crystal-lang
09:26
snsei has joined #crystal-lang
09:31
snsei has quit [Ping timeout: 276 seconds]
09:47
vikaton has quit [Quit: Connection closed for inactivity]
10:02
soveran has quit [Remote host closed the connection]
11:00
soveran has joined #crystal-lang
11:00
soveran has joined #crystal-lang
11:00
soveran has quit [Changing host]
11:27
snsei has joined #crystal-lang
11:32
snsei has quit [Ping timeout: 250 seconds]
11:58
ruslux has joined #crystal-lang
12:09
ruslux has quit [Ping timeout: 250 seconds]
12:20
TheLemonMan has joined #crystal-lang
12:37
pawnbox has quit [Remote host closed the connection]
12:44
mgarciaisaia has joined #crystal-lang
12:44
mgarciaisaia has left #crystal-lang [#crystal-lang]
12:50
mgarciaisaia1 has joined #crystal-lang
12:50
mgarciaisaia1 has left #crystal-lang [#crystal-lang]
13:04
pawnbox has joined #crystal-lang
13:15
matp has quit [Remote host closed the connection]
13:18
matp has joined #crystal-lang
13:28
snsei has joined #crystal-lang
13:29
pawnbox has quit [Remote host closed the connection]
13:33
snsei has quit [Ping timeout: 244 seconds]
13:34
get_drunk has joined #crystal-lang
13:37
sfcgeorge has joined #crystal-lang
13:43
pawnbox has joined #crystal-lang
13:53
<
crystal-gh >
crystal/master 4e8aa74 Ary Borenszweig: Merge pull request #2761 from crystal-lang/feature/class_vars...
14:06
snsei has joined #crystal-lang
14:18
<
get_drunk >
asterite: a long time ago, there was a discussion I think on one of the crystal blog posts about elixir
14:19
<
get_drunk >
and it was basically that you thought that FP wasn't a great approach in elixir compared to how easy it is to make things with OOP style, and that elixir has a better system already in place for macros
14:19
<
asterite >
Mmm... I think I just said that doing List.foo(list) and Enum.foo(enum) instead of just list.foo and enum.foo seems a bit verbose to me :)
14:20
<
get_drunk >
but crystal is eventually going to get better macros, and like generics and things like that, right? would that be better than elixir?
14:20
<
get_drunk >
well and the guy replied that you can do |> List.whatever
14:20
<
get_drunk >
which is true in elixir and like f# for example
14:20
<
get_drunk >
but that sort of expressivity is certainly possible in crystal in the future
14:21
<
get_drunk >
crystal macros seem to already work with the ast directly, is that so different from how elixir works?
14:23
snsei has quit [Remote host closed the connection]
14:25
snsei has joined #crystal-lang
14:27
kfpratt has joined #crystal-lang
14:27
steenuil has joined #crystal-lang
14:29
<
jhass >
elixir runs on the erlang VM, it's not a compiled language. Which makes putting it on a single "better/worse" scale with Crystal fairly pointless IMO
14:29
<
jhass >
generally calling languages better or worse than each other is in fact
14:30
snsei has quit [Remote host closed the connection]
14:33
<
get_drunk >
I mean the macros specifically
14:34
<
get_drunk >
which is what I said
14:39
snsei has joined #crystal-lang
14:42
snsei has quit [Remote host closed the connection]
14:43
snsei has joined #crystal-lang
14:48
get_drunk has quit [Ping timeout: 250 seconds]
14:48
sfcgeorge is now known as sfcg[away]
14:49
<
asterite >
Oh, we can probably improve macros
14:49
<
asterite >
though I'm not sure they will ever be as powerful as in elixir... I'm also not sure I'd like that
14:50
<
asterite >
jhass: I was thinking about generic types and splats... I think now it's good that we have Array(...), looks like a method call. And you can use splat, and named arguments there too (well, just for NamedTuple now)
14:51
<
asterite >
But I think the semantic shouldn't match that of method calls. For example I'd like Proc to be Proc(*T, R), as you said. In regular methods R would be a required named argument... but we don't want that
14:51
<
asterite >
In fact, I don't know if named arguments in a generic type other than NamedTuple is useful...
14:51
<
jhass >
yeah, totally not
14:51
<
asterite >
As a side note, yesterday I learned that block arguments in Ruby are a lot like method arguments
14:51
<
asterite >
you can use double splat, you can even use keyword arguments
14:52
<
asterite >
though I never saw that being used anywhere
14:52
<
jhass >
and I would say we ignore named generics until somebody comes up with a convincing usecase :)
14:52
<
jhass >
yeah, they are the same actually I think
14:52
<
jhass >
Method#arity and Proc#arity are basically the same method
14:53
<
jhass >
mh, not sure whether method arguments support unpacking, let's see
14:54
<
jhass >
(no, I don't think we should copy that)
15:01
get_drunk has joined #crystal-lang
15:02
mgarciaisaia has joined #crystal-lang
15:02
mgarciaisaia has left #crystal-lang [#crystal-lang]
15:03
<
asterite >
wow, I didn't know that
15:08
sfcg[away] is now known as sfcgeorge
15:09
Philpax has quit [Ping timeout: 252 seconds]
15:27
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
15:29
Raimondii has joined #crystal-lang
15:30
<
BlaXpirit >
for an interesting perspective, Python actually dropped this exact feature
15:32
Raimondi has quit [Ping timeout: 240 seconds]
15:35
Raimondii is now known as Raimondi
15:40
ruslux has joined #crystal-lang
15:42
mark_66 has quit [Quit: Leaving.]
15:49
<
asterite >
I think it's ok from a purist point of view, but probably not very practical and maybe makes the implementation more complex
15:49
snsei has quit [Remote host closed the connection]
15:50
<
jhass >
yeah our argument matching is already complex enough now IMO :)
15:50
<
jhass >
for the user too
15:50
<
get_drunk >
we are too smart
16:06
ruslux has quit [Ping timeout: 250 seconds]
16:06
crack08 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:09
soveran has quit []
16:45
ryanw-se has joined #crystal-lang
17:04
vikaton has joined #crystal-lang
17:23
<
crystal-gh >
crystal/master ff4891a Ary Borenszweig: Generics: allow splat argument to be in any position, together with more non-splat arguments
17:23
<
crystal-gh >
crystal/master 370db4c Ary Borenszweig: Make Proc be Proc(*T, R)
17:23
<
crystal-gh >
crystal/master 738fb36 Ary Borenszweig: Formatter: correctly format splat type arguments
17:29
get_drunk has quit [Quit: Page closed]
17:38
mgarciaisaia has joined #crystal-lang
17:38
mgarciaisaia has left #crystal-lang [#crystal-lang]
18:04
paulcsmith_ has joined #crystal-lang
18:58
crystal-lang646 has joined #crystal-lang
18:58
crystal-lang646 is now known as jake-how
19:03
jamie_ca has quit [Ping timeout: 276 seconds]
19:03
braidn has quit [Ping timeout: 244 seconds]
19:06
g3funk has joined #crystal-lang
19:07
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:08
jamie_ca has joined #crystal-lang
19:09
paulcsmith_ has joined #crystal-lang
19:10
sp4rrow has joined #crystal-lang
19:13
<
asterite >
jake-how: just enum, without flags
19:14
<
asterite >
flags is when you'd like to combine two values
19:16
A124 has quit [Read error: Connection reset by peer]
19:16
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:17
A124 has joined #crystal-lang
19:18
paulcsmith_ has joined #crystal-lang
19:21
paulcsmith_ has quit [Client Quit]
19:21
paulcsmith_ has joined #crystal-lang
19:22
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
19:28
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:28
jake-how_ has joined #crystal-lang
19:29
<
jake-how_ >
asterite: normal enum can handle shuttling back and forth between a string? I want to use this for mapping JSON values
19:29
paulcsmith_ has joined #crystal-lang
19:30
<
jhass >
jake-how_: well, the default Enum#to_json uses the integer value
19:30
<
jhass >
but @[Flags] doesn't change that
19:31
jake-how has quit [Ping timeout: 250 seconds]
19:32
<
jake-how_ >
id like a way to make fromJSON and toJSON have the expected value
19:33
<
jhass >
the default from_json does handle strings
19:34
<
jhass >
to_json you have to override
19:35
rvchangue has quit [Ping timeout: 246 seconds]
19:37
TheLemonMan has joined #crystal-lang
19:38
rvchangue has joined #crystal-lang
19:40
<
jhass >
asterite: what do you think of changing pp to print x #=> value ?
19:40
<
jhass >
instead of = which gets rather confusing with pp foo = bar or pp foo == bar
19:40
<
asterite >
Sounds like a good idea :)
19:41
<
asterite >
In any case pp is used for debugging, so it shouldn't bother or "break" something
19:41
<
jhass >
mmh, #=> or # =>
19:41
<
asterite >
I'd use `# => ...`
19:41
<
asterite >
that's what the formatter does, and seem to be recommended in Ruby
19:41
<
asterite >
On this topic, I'd eventually like to have a pretty print like in Ruby... I tried to implement it, but it's not trivial
19:41
<
asterite >
Ruby's is magical, it knows when to do a line break in the right place
19:42
<
asterite >
so... maybe the current pp should have a different name
19:42
<
jhass >
did you see awesome_print?
19:42
<
asterite >
Oh, I think I used it a couple of times
19:43
<
asterite >
Maybe we can wait until someone implements awesome_print, ap, so there's no conflict :-P
19:44
<
jake-how_ >
jhass: got it thanks!
19:45
<
jhass >
asterite: the most magical ruby gem in that are probably still is seeing_is_believing
19:46
<
asterite >
seems like our playground... didn't know such thing existed for Ruby
19:49
<
crystal-gh >
crystal/master d4f6b72 Jonne Haß: Change pp macro output from exp = value to exp # => value
19:50
<
asterite >
looks like a bug
19:50
<
asterite >
probably related to the splat argument
19:53
rvchangue has quit [Ping timeout: 244 seconds]
19:54
<
asterite >
Please :-)
19:54
<
asterite >
I almost have implemented yield *args :-D
19:54
<
asterite >
`do |*args|` is a bit different, but shouldn't be that hard
19:54
Nik736 has joined #crystal-lang
19:55
rvchangue has joined #crystal-lang
19:55
<
jhass >
haha, I got the do |*args| RFC as triage today
19:56
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:57
<
asterite >
Sure it was today and not two days ago? :-)
19:58
<
asterite >
The nice thing is that this also helps with `delegate`, we could define an extra overload with a block that just forwards all args
19:58
<
asterite >
Still won't work with captured block, but that's the only case left
20:01
sp4rrow has joined #crystal-lang
20:02
paulcsmith_ has joined #crystal-lang
20:08
<
Yxhuvud >
hm, you don't need the * there in ruby, right?
20:10
<
jhass >
Yxhuvud: where?
20:10
<
Yxhuvud >
do |args|
20:10
<
jhass >
well, yes and no, it's a bit complicated
20:10
<
jhass >
it helps to understand that yield actually supports only a single argument
20:10
<
jhass >
yield a, b is actually yield [a, b]
20:11
<
Yxhuvud >
hellishly complicated, but for that simple case.
20:11
<
jhass >
so an array
20:11
<
jhass >
so do |a, b| is actually do |(a, b)|, array unpacking
20:11
<
Yxhuvud >
ruby block argument assignent is an unholy marriage between the rules for normal argument lists and parallel assignment
20:12
<
Yxhuvud >
like you can have default args and stuff.
20:12
<
jhass >
now, say we yield a, b, c, do |a, *b| or do |*a, b| makes a lot of sense in that case
20:12
<
jhass >
but supporting just that without generalizing would be inconsistent
20:12
<
jhass >
hence do |*a| is supported
20:13
<
jhass >
the best feature is do |a; b|, who can tell me what it does? :P
20:16
<
jhass >
only place I know where ; is not \n
20:16
<
jhass >
(besides inside literals of course)
20:16
<
Yxhuvud >
(it is also allowed to use a trailing comma)
20:20
<
crystal-gh >
crystal/master 48ca11a Ary Borenszweig: Compiler: some fixes around generic types
20:20
<
crystal-gh >
crystal/master 00492a6 Ary Borenszweig: Support splats in yields. Fixes #392
20:21
<
BlaXpirit >
welp, i nominate crystal for the most consistent language ever
20:22
<
BlaXpirit >
maybe 2nd to esperanto :D
20:23
<
asterite >
Well, in Esperanto "kolego" is both "big neck" and "colleague", so...
20:23
* BlaXpirit
remembers the pull request that adds another meaning to the word "product"
20:24
<
BlaXpirit >
now array actually has 2 `product` methods that do different things
20:25
<
BlaXpirit >
well, 8 different methods, 4 of which do one thing and the other 4 (inherited from enumerable) do a different thing
20:26
<
jhass >
yeah I wasn't particularly fond of that either
20:26
<
jhass >
one issue is that math uses the same name for both operations too
20:26
<
jhass >
if you have any ideas for better names for either...
20:26
<
BlaXpirit >
the solution? don't make a shortcut {|a,b|a*b} -> product
20:27
<
BlaXpirit >
i mean reduce{|a,b|a*b}
20:27
<
jhass >
then we would need to drop .sum too
20:27
<
jhass >
ruby doesn't have either too
20:27
<
BlaXpirit >
all the languages that come to mind have 'sum' but not 'product'
20:28
<
asterite >
And Ruby added sum recently...
20:28
<
jhass >
and it is actually a pain point of the language
20:28
<
jhass >
really? didn't notice
20:28
<
asterite >
Seems so, saw it in a tweet
20:28
<
asterite >
It seems they also optimized [foo, bar].max
20:28
<
jhass >
so for 2.4 then?
20:29
<
asterite >
I think so, yes
20:37
<
crystal-gh >
crystal/master efd1598 Ary Borenszweig: Fixed #2773: Can't override macro with splat argument
20:39
<
jhass >
asterite: btw I still think that macro lookup should eventually interleave with method lookup, when it comes to looking into ancestors and parent namespaces at least
20:40
<
asterite >
I think it should be possible to do
20:55
<
shadowshell >
hey crystal folks!
20:55
<
shadowshell >
thanks for all your work, crystal is looking really neat
20:55
<
jhass >
hey, thanks :)
20:55
<
shadowshell >
i've read the documentation and have been playing around with some code of my own
20:56
<
shadowshell >
i have a question about a pattern that is documented, but maybe not explained (at least enough to satisfy my personal curiosity)
20:57
<
shadowshell >
the pattern of assigning instance variable to locals, modifying the local, the reassigning the instance variable to the value of the mutated local
20:57
<
shadowshell >
the question is
20:58
<
shadowshell >
is this a design decision to force explicitness around state mutation or a compiler limitation of some kind?
20:58
<
shadowshell >
just curious
20:58
<
jhass >
neither, it's preparation for parallelism
20:59
<
jhass >
thought we had a section in the docs about it somewhere but can't find it atm
20:59
<
shadowshell >
you do
20:59
<
shadowshell >
but it doesn't mention the "why" or i just missed it
20:59
<
jhass >
the issue is that in a parallel program, an instance variable may change at any point
20:59
<
shadowshell >
let me see if i can find the section
20:59
<
shadowshell >
sure, makes sense totally
21:00
<
jhass >
let me find the issue where I wrote up a bit longer explanation
21:00
<
shadowshell >
thanks!
21:01
<
jhass >
so you need it in order to do type reduction for example
21:02
<
shadowshell >
great, thanks for the link!
21:02
<
jhass >
in the example you linked, say we did return @socket if @socket; the compiler can't reduce the type of @socket removing the nil
21:02
<
jhass >
because it may change between the check of the if and the actual return
21:02
<
jhass >
if it then would reduce the type, there's a possibility where nil is returned while the return type doesn't include nil
21:03
<
shadowshell >
which is the exact behavior that was kicking me in the face when i started writing crystal and pretending it was ruby :)
21:04
<
shadowshell >
forcing me to read the docs
21:04
<
shadowshell >
and ask this question
21:04
<
sp4rrow >
I noticed the ci downloads the darwin version of llvm
21:04
<
jhass >
yes, it's one of the most common questions :)
21:04
<
sp4rrow >
wouldn't the standard linux install have a different llvm?
21:04
<
jhass >
sp4rrow: yes, the linux docker images have 3.6 installed from the repos
21:05
<
jhass >
which is actually good, since atm we kinda support both versions ;)
21:05
<
jhass >
so we get some test exposure against both too
21:07
<
jhass >
shadowshell: btw contributions towards making this clearer in the docs are more than welcome ;)
21:08
<
shadowshell >
indeed
21:08
<
shadowshell >
was just rereading the section mentioned in the comments you linked
21:10
<
shadowshell >
it does mention the parallelism part of the issue we are avoiding with this blurb "Another reason is that another thread could change that instance variable after checking the condition."
21:10
Ven has joined #crystal-lang
21:10
<
shadowshell >
but it could stand to be clearer
21:10
<
shadowshell >
is there a list of commonly asked things? do you have a gh issue for needed documentation?
21:11
<
shadowshell >
interesting
21:11
<
shadowshell >
i'll look at those things and see where i can chip in
21:11
<
shadowshell >
thanks!
21:12
<
shadowshell >
fair enough. all good devs are in my experience
21:13
<
jhass >
jeez didn't think it's actually over 500
21:22
<
crystal-gh >
[crystal] lbguilherme opened pull request #2774: WebSocket: Add support for receiving binary messages (master...patch-4)
https://git.io/voLQs
21:41
<
sp4rrow >
just curious it looks like llvm is on version 3.8 and crystal is on 3.6 is there a reason to not upgrade?
21:42
<
sp4rrow >
mostly just curious
21:42
<
sp4rrow >
is seems like it is pretty recent change as in the past few months
21:46
<
asterite >
sp4rrow: should be easy, but since it's working it's easier to just keep things like that instead of risking breaking something
21:46
<
asterite >
Mmm... we need to change the configuration in omnibus (the project that builds the releases), and some other things
21:46
<
asterite >
Basically, not a high priority right now
21:47
pawnbox has quit [Remote host closed the connection]
21:48
<
sp4rrow >
yeah the release notes where not that serious
21:48
<
sp4rrow >
seems like good incremental improvements
21:48
<
sp4rrow >
this is a github thing
21:48
<
sp4rrow >
but it seems like some PRs are just waiting on a few changes
21:49
<
sp4rrow >
I made a branch and was going to make a PR into someone elses PR
21:49
<
jhass >
asterite: still think it should be :(
21:49
<
sp4rrow >
is that possible
21:49
<
jhass >
sp4rrow: not without their collaboration
21:49
<
sp4rrow >
interesting
21:49
<
jhass >
sp4rrow: so might be easier to just fetch their PR into a local branch, add your changes ontop and make a new PR
21:50
<
sp4rrow >
yeah I was hoping that would not be taken the wrong way
21:50
<
sp4rrow >
but I guess if it has been a few months that is probably not a problem
21:50
<
jhass >
usually isn't, I mean by taking over their commits you keep attribution
21:51
<
sp4rrow >
you can do that by just not touching there commits right
21:51
<
sp4rrow >
just adding on top of them
21:51
<
sp4rrow >
or is there a github way of marking the commit objects
21:51
<
jhass >
even squashing their commits together will retain their author info
21:51
<
jhass >
github just reads the author email from the commit
21:52
<
sp4rrow >
ok cool that makes sense
21:53
<
sp4rrow >
is there any community managed forum for crystal or should I just ask the google groups
21:53
<
sp4rrow >
I was going to see if there was some easy features ot work on
21:54
jake-how_ has quit [Ping timeout: 250 seconds]
21:54
<
jhass >
the google groups mailing list is just fine, for general (non contributing) questions there's also stack overflow
21:54
<
jhass >
and sometimes somebody uses the subreddit
21:55
<
sp4rrow >
I didnt know there was a reddit
21:55
<
jhass >
two actually -.-
21:56
<
sp4rrow >
cool thanks
21:57
<
jhass >
hopefully someday somebody manages to merge them somehow
21:59
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:01
<
crystal-gh >
crystal/master b8ea6a2 Ary Borenszweig: Revert "Fixed #2773: Can't override macro with splat argument"...
22:01
<
crystal-gh >
crystal/master 4502a4d Ary Borenszweig: Splat in block arguments. Fixes #1171
22:02
<
jhass >
what a beautiful day
22:03
<
asterite >
I'm working a lot with the compiler lately, not so much with the standard library, and I feel I know it better now and know where to make changes :-)
22:04
<
sp4rrow >
I would like to hear your thoughts on that
22:04
ozra_ has joined #crystal-lang
22:04
<
sp4rrow >
is there anywhere you are writing or talking about that?
22:07
<
jhass >
asterite: soo, then Array(Object) next? :P
22:11
ozra_ has quit [Ping timeout: 276 seconds]
22:12
ozra_ has joined #crystal-lang
22:16
<
asterite >
Mmm.. that touches generics a bit, I'll wait for waj to come back for that
22:20
ozra_ has quit [Ping timeout: 240 seconds]
22:22
<
asterite >
I think we will have to use some macro code in Enumerable after all...
22:23
<
asterite >
Array(T) is Enumerable(T), Hash(K, V) is Enumerable(K, V)
22:23
ozra_ has joined #crystal-lang
22:23
<
asterite >
but when you do select you want a single type for the array, but you want a tuple for the hash
22:23
<
asterite >
So basically all methods must check the size of T?
22:27
<
jhass >
asterite: huh, Enumerable(Foo) should make T {Foo}, no?
22:27
<
asterite >
but we don't want select to return Array({Foo})
22:27
<
jhass >
and Array(*{Foo}) should be Array(Foo)?
22:27
<
asterite >
Now consider a Hash, it's Enumerable(K, V), but you want select to return Array({K, V})
22:28
<
asterite >
and not Array(K, V)
22:28
<
asterite >
that would result of splatting T
22:28
<
asterite >
So magical, Ruby...
22:29
ozra_ has quit [Remote host closed the connection]
22:29
ozra_ has joined #crystal-lang
22:30
<
jhass >
allow reassigning T! {% T = T[0] if T.size == 1 %}
22:30
<
jhass >
maybe not...
22:30
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
22:30
<
asterite >
but the body changes, in one case we splat the block argument, in the other no
22:31
<
asterite >
or we could always splat it there, but then `push` needs to splat or not splat
22:31
<
asterite >
Well, we have to think a bit more
22:33
ozra_ has quit [Ping timeout: 240 seconds]
22:34
ozra_ has joined #crystal-lang
22:39
<
jhass >
eh wrong way around
22:39
sp4rrow has joined #crystal-lang
22:40
ozra_ has quit [Read error: Connection reset by peer]
22:40
Raimondii has joined #crystal-lang
22:41
ozra_ has joined #crystal-lang
22:42
<
Yxhuvud >
the heisensplat?
22:43
Raimondi has quit [Ping timeout: 240 seconds]
22:44
<
Yxhuvud >
can't you do something similar to ruby? some classes include Enumerable, but still implement their own specializations of certain methods. Hash could define each to yield a pair.
22:45
<
jhass >
that's what we're currently doing
22:45
<
jhass >
but if we can avoid that boilerplate, why not
22:45
<
jhass >
especially since we have like 3 or 4 Hash like types
22:45
Raimondii is now known as Raimondi
22:47
ozra_ has quit [Read error: Connection reset by peer]
22:47
<
Yxhuvud >
autosplatting like that seems like going down the same rabbithole of complexity ruby walked down. eventually someone will want to combine them with default arguemnts and whatnot.
22:48
<
jhass >
it's not autosplatting though ;)
22:48
ozra_ has joined #crystal-lang
22:48
<
jhass >
it's just that Enumerable splats
22:48
<
jhass >
sleep well!
22:55
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
22:59
ozra_ has quit [Ping timeout: 250 seconds]
22:59
ozra_ has joined #crystal-lang
23:05
get_drunk has joined #crystal-lang
23:05
<
get_drunk >
literally everywhere I go to read stuff, someone in the comments asks "does crystal have windows support yet?"
23:06
<
jhass >
one would imagine there's enough people that they'd built a joint effort to do it
23:07
<
get_drunk >
i'd imagine a 100 billion dollar company could make an os that doesnt suck to begin with
23:07
<
get_drunk >
but i guess that would just be stupid
23:09
<
get_drunk >
what can a stupid person be doing to benefit crystal right now?
23:09
<
jhass >
write some stupid standard library code or docs!
23:10
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
23:10
<
jhass >
write some awesome tool or library
23:11
<
jhass >
pester us with all the bugs you find in the process
23:13
<
get_drunk >
on a scale of 0 to don't, how good of an idea would it be to find cool, unmaintained ruby projects and port them to crystal?
23:13
<
jhass >
there's probably some unmaintained crystal projects by now that could use porting to latest
23:13
<
jhass >
but depends on the project
23:14
<
jhass >
much stuff is better off just taking the core concept and trying to find an idiomatic API and implementation for Crystal
23:14
<
get_drunk >
also how does gitbook work? I dont see where I would actually submit documentation commits
23:15
<
jhass >
CI will rebuilt it for ya
23:17
<
get_drunk >
ah, ok I see
23:20
trapped has quit [Read error: Connection reset by peer]
23:23
snsei has joined #crystal-lang
23:37
snsei has quit [Remote host closed the connection]
23:39
snsei has joined #crystal-lang
23:40
get_drunk has quit [Quit: Page closed]
23:41
snsei has quit [Remote host closed the connection]
23:44
snsei has joined #crystal-lang
23:47
vikaton has quit [Quit: Connection closed for inactivity]