00:08
<
crystal-gh >
crystal/master 084b406 Ary Borenszweig: Reomved a bunch of TODOs and obsolete comments
00:08
<
crystal-gh >
crystal/master 6aba9c8 Ary Borenszweig: Compiler: flip order of Location constructor arguments, and document it
00:08
<
crystal-gh >
crystal/master 64a2f11 Ary Borenszweig: Compiler: a few more clean ups and docs in Program
00:23
zacts has joined #crystal-lang
00:23
zacts has left #crystal-lang ["WeeChat 1.4"]
00:26
pawnbox has joined #crystal-lang
00:31
pawnbox has quit [Ping timeout: 264 seconds]
00:34
Oliphaunte has joined #crystal-lang
00:39
Oliphaunte has quit [Ping timeout: 264 seconds]
00:50
Kurisu_ has joined #crystal-lang
00:50
Kurisu_ has quit [Client Quit]
01:02
pawnbox has joined #crystal-lang
01:07
pawnbox has quit [Ping timeout: 240 seconds]
01:29
Oliphaunte has joined #crystal-lang
01:33
Oliphaunte has quit [Ping timeout: 272 seconds]
01:38
pawnbox has joined #crystal-lang
01:43
pawnbox has quit [Ping timeout: 276 seconds]
01:46
ome has joined #crystal-lang
01:51
matp has quit [Remote host closed the connection]
01:53
maxpowa has quit [Ping timeout: 252 seconds]
02:04
Netfeed has quit [Ping timeout: 276 seconds]
02:23
Oliphaunte has joined #crystal-lang
02:29
Oliphaunte has quit [Ping timeout: 276 seconds]
02:34
Netfeed has joined #crystal-lang
02:43
matp has joined #crystal-lang
02:49
snsei has joined #crystal-lang
03:03
pawnbox has joined #crystal-lang
03:07
pawnbox has quit [Ping timeout: 258 seconds]
03:16
snsei has quit [Remote host closed the connection]
03:38
willl has quit [Quit: Connection closed for inactivity]
03:42
pawnbox has joined #crystal-lang
04:11
Oliphaunte has joined #crystal-lang
04:15
Oliphaunte has quit [Ping timeout: 244 seconds]
04:48
Oliphaunte has joined #crystal-lang
04:52
Oliphaunte has quit [Ping timeout: 258 seconds]
05:08
onionhammer has quit [Ping timeout: 276 seconds]
05:47
onionhammer has joined #crystal-lang
05:51
dminuoso has joined #crystal-lang
06:26
dminuoso has quit [Ping timeout: 272 seconds]
06:27
dminuoso has joined #crystal-lang
06:30
dminuoso has quit [Read error: Connection reset by peer]
06:35
<
FromGitter >
<sdogruyol> morning all
06:39
ome has quit [Quit: Connection closed for inactivity]
06:41
dminuoso has joined #crystal-lang
06:47
dminuoso has quit [Remote host closed the connection]
06:56
dminuoso has joined #crystal-lang
07:27
pawnbox has quit [Read error: Connection reset by peer]
07:28
pawnbox has joined #crystal-lang
08:01
mark_66 has joined #crystal-lang
08:12
slash_nick has quit [Ping timeout: 244 seconds]
08:12
FromGitter has quit [Ping timeout: 244 seconds]
08:12
FromGitter has joined #crystal-lang
08:18
slash_nick has joined #crystal-lang
08:20
pawnbox has quit [Remote host closed the connection]
08:22
pawnbox has joined #crystal-lang
08:23
dminuoso_ has joined #crystal-lang
08:26
dminuoso has quit [Ping timeout: 260 seconds]
08:54
<
jhass >
ugh, we still don't require the spaces before : in lib definitions?
08:55
<
BlaXpirit >
j2k, could be anything, maybe tell us about the actual library?
08:55
<
BlaXpirit >
Pointer(Int64) sure looks weird
08:56
<
jhass >
+1 let's see the C lib
08:57
<
j2k >
This is the "spawn" function
08:57
<
jhass >
the invalid dereference surely happens inside it
08:58
<
j2k >
Im probably using it wrong
08:58
<
BlaXpirit >
j2k, well sure you are. Target is not a pointer to int64, it's a pointer to a complex struct
08:59
<
BlaXpirit >
though it might pass as it's still a pointer
08:59
<
jhass >
yeah, dunno C ABI is potentially weird there
08:59
<
jhass >
type it as Pointer(Void)
08:59
<
jhass >
or just Void* for short
09:00
<
jhass >
where's exp_renameObject?
09:00
A124 has quit [Quit: '']
09:01
<
j2k >
that was just an example
09:01
<
j2k >
was trying exp_getMousePos
09:02
<
BlaXpirit >
j2k, give only real examples, because it's not really about crystal at this point, we need to figure out how to actually use the lib and what's going wrong
09:02
<
j2k >
Yeah I thought it was crystal so wanted to simplify it :/
09:04
<
jhass >
void exp_getMousePos(Target t, int &x, int &y)
09:04
<
jhass >
my C++ sucks, what might that look like in C?
09:04
<
BlaXpirit >
jhass, just int* i guess
09:04
<
jhass >
yeah, me too
09:05
<
jhass >
j2k: so try x : Int32*, y : Int32*
09:05
<
BlaXpirit >
and LibSmartRemote.mouse_pos(x, out pos_x, out pos_y)
09:05
<
jhass >
and out x, out y in the call
09:06
<
BlaXpirit >
>> Pointer(Void) == Void*
09:06
<
BlaXpirit >
right..
09:07
<
jhass >
>> Union(Pointer(Void), Void*)
09:08
pawnbox has quit [Remote host closed the connection]
09:09
<
BlaXpirit >
jhass, did you see what I said yesterday? any way to force the fields within a class to appear in some particular order in memory?
09:09
<
jhass >
yes, I did see it
09:09
<
jhass >
none that I'm aware of
09:09
<
BlaXpirit >
why does it rearrange them anyway?
09:09
<
jhass >
well short of making the class have a single var that's a struct I guess
09:10
<
jhass >
alignment optimization I guess?
09:10
<
BlaXpirit >
even that could lead us to a clue
09:10
<
BlaXpirit >
sigh, predicting optimal alignment?
09:11
<
BlaXpirit >
so fragile
09:12
<
BlaXpirit >
well it doesn't seem to depend on the size of the preceding array so it's not exactly alignment
09:13
<
jhass >
it might be just however it ends up in the AST after transformations and shit
09:15
A124 has joined #crystal-lang
09:15
<
BlaXpirit >
does it simply put arrays at the end?
09:17
<
BlaXpirit >
i could store the extra data at the end of an array but the main point of the extra variables is storing references to make GC happy and not collect them
09:18
<
jhass >
tbh I think you simply have no guarantees atm
09:20
pawnbox has joined #crystal-lang
09:23
<
j2k >
Hey guys thank you :) Got it to work
09:23
<
j2k >
Couldn't use `out` though. The parameters needed to be initialised.
09:24
<
j2k >
And crystal compiler says "variable X is already defined".
09:24
<
BlaXpirit >
j2k, well don't define it beforehand
09:25
<
j2k >
I didn't - the error is just a bit weird.
09:26
<
BlaXpirit >
jhass, the closest to a guarantee might be that consecutively defined variables of the same type should be consecutive in the result
09:26
<
BlaXpirit >
so i may need to define all the extra variables i'm going to use in the base class
09:28
<
BlaXpirit >
[12:05:21] <jhass> j2k: so try x : Int32*, y : Int32*
09:28
<
j2k >
oh sorry bad copy/paste I have that
09:29
<
BlaXpirit >
the command you wrote below is indeed what `out` ends up as behind the scenes
09:29
<
BlaXpirit >
comment* :|
09:29
<
j2k >
BlaXpirit: I think it does "p_x = uninitialized Int32" behind the scenes not "p_x = 0"
09:30
<
BlaXpirit >
probably
09:33
<
jhass >
no read to x or y
09:33
<
jhass >
so it shouldn't matter
09:35
pawnbox has quit [Remote host closed the connection]
09:40
pawnbox has joined #crystal-lang
09:40
pawnbox has quit [Remote host closed the connection]
09:41
<
RX14 >
why do we still have postfix rescue?
09:41
<
RX14 >
i never even knew it existed before today
09:41
<
RX14 >
but i think its a terrible idea
09:42
<
RX14 >
the article from sitepoint on crystal seemed to use it
09:42
<
RX14 >
>>raise "a" resuce nil
09:42
<
RX14 >
>>raise "a" rescue nil
09:42
<
RX14 >
yeah thats not nice
09:44
<
RX14 >
i also think the sitepoint article could mention crystal play where itt alks about repl
09:44
<
RX14 >
they're not the same
09:44
<
RX14 >
i do miss being able to open a repl in some random function in the middle of a webapp and execute code
09:44
<
BlaXpirit >
it could mention but the person clearly doesnt know about it
09:44
<
RX14 >
but gdb does exist
09:45
<
jhass >
well, Crystal postfix rescue is not as terrible as Ruby's as it allows for rescue e : IO::Error e.message
09:45
<
RX14 >
oh? thats nice
09:45
<
RX14 >
yeah keep it then
09:45
<
RX14 >
>> raise "" rescue e : IO::Error e.message rescue nil
09:46
<
RX14 >
>> raise "" rescue e : IO::Error e.message
09:46
<
jhass >
well, something like it
09:46
<
jhass >
let me try to find it
09:46
<
RX14 >
would be nice if it was documented.....
09:49
<
BlaXpirit >
seems like there's no such thing
09:50
<
jhass >
meh, I'm fairly sure it used to work
09:58
pawnbox has joined #crystal-lang
11:03
mose has quit [Changing host]
11:03
mose has joined #crystal-lang
11:04
pawnbox has quit [Remote host closed the connection]
11:13
pawnbox has joined #crystal-lang
11:23
<
crystal-gh >
crystal/master 971831f Jonne Haß: Unify String and Char to integer/float conversion API...
11:23
<
crystal-gh >
crystal/master 1489670 Julien Portalier: Add String#to_f(strict: false)
11:23
<
crystal-gh >
crystal/master da3c38e Julien Portalier: Merge pull request #3025 from jhass/to_num...
11:49
pawnbox has quit [Remote host closed the connection]
11:49
pawnbox has joined #crystal-lang
12:02
CompanionCube has quit [Ping timeout: 264 seconds]
12:15
CompanionCube has joined #crystal-lang
12:15
CompanionCube has quit [Changing host]
12:15
CompanionCube has joined #crystal-lang
12:23
pawnbox has quit [Remote host closed the connection]
12:39
pawnbox has joined #crystal-lang
12:39
rolha has joined #crystal-lang
12:40
pawnbox has quit [Remote host closed the connection]
12:40
pawnbox has joined #crystal-lang
12:55
<
crystal-gh >
[crystal] jhass opened pull request #3030: Add OptionParser#missing_option and OptionParser#invalid_option (master...option_parser_handlers)
https://git.io/vKMwT
13:10
CompanionCube has quit [Max SendQ exceeded]
13:11
CompanionCube has joined #crystal-lang
13:11
CompanionCube has quit [Changing host]
13:11
CompanionCube has joined #crystal-lang
13:11
Oliphaunte has joined #crystal-lang
13:22
<
FromGitter >
<jmoriau> (I would like to run a block that would acquire and release the lock after)
13:22
<
jhass >
exactly that
13:23
<
FromGitter >
<jmoriau> yeah Im reading that
13:23
<
FromGitter >
<jmoriau> but it doesnt yield the file
13:23
<
FromGitter >
<jmoriau> how can I read/write to it
13:23
<
jhass >
well, just closure it
13:23
<
FromGitter >
<jmoriau> (sorry if it sounds incredibly stupid haha)
13:24
<
jhass >
f.flock_exclusive { f.write("hey" }
13:24
<
FromGitter >
<jmoriau> ah ok so I can't do it all on the same line
13:24
<
FromGitter >
<jmoriau> have to File.new
13:24
<
FromGitter >
<jmoriau> then flock
13:25
<
FromGitter >
<jmoriau> thanks!
13:25
<
jhass >
you shouldn't File.new anyway
13:25
<
FromGitter >
<jmoriau> ah ?
13:25
<
jhass >
File.open(..) {|f| f.flock_exclusive { f.write(...) } }
13:25
<
FromGitter >
<jmoriau> I see, thanks!
13:40
Oliphaunte has quit [Remote host closed the connection]
13:42
pawnbox has quit [Remote host closed the connection]
13:52
dminuoso_ has quit [Ping timeout: 250 seconds]
13:54
<
crystal-gh >
crystal/master f6b9b0c Ary Borenszweig: Fixed #3029: incorrect restriction for module vs. Path
13:54
<
crystal-gh >
crystal/master 969c103 Ary Borenszweig: Fixed #3032: Proc that returns NoReturn should be compatible with a proc that returns any type
13:54
<
crystal-gh >
crystal/master e91a76c Ary Borenszweig: Compiler: don't use init flag for simple constants
14:03
<
asterite >
BlaXpirit: if you can, open an issue for the trouble you have. It's not very easy to discuss those things here, keep track of the whole conversation, use code snippets, etc.
14:03
dminuoso has joined #crystal-lang
14:04
<
asterite >
The issue you are having is just because the different types you can "declare" an instance variable are processed in different orders, or put in different "buckets", so the order is not preserved... but it could
14:04
pawnbox has joined #crystal-lang
14:05
<
asterite >
But I wouldn't rely on how the compiler lays out things, because then we couldn't do some optimizations (for example rearranging some instance vars for less memory usage)... though maybe we could have an attribute to preserve the order
14:08
<
RX14 >
I much prefer discussing most problems in IRC because it's usually my fault and you get much faster feedback
14:09
pawnbox has quit [Ping timeout: 240 seconds]
14:09
mark_66 has quit [Quit: Leaving.]
14:10
mark_66 has joined #crystal-lang
14:23
Oliphaunte has joined #crystal-lang
14:24
Oliphaunte has quit [Remote host closed the connection]
14:25
Oliphaunte has joined #crystal-lang
14:35
pawnbox has joined #crystal-lang
14:39
dminuoso has quit [Remote host closed the connection]
14:41
pawnbox_ has joined #crystal-lang
14:43
<
crystal-gh >
crystal/master d63ebf8 Ary Borenszweig: Compiler: replace `binary` property of `If` with two booleans, and moved to semantic code
14:44
pawnbox has quit [Ping timeout: 276 seconds]
15:11
mark_66 has quit [Quit: Leaving.]
15:28
[spoiler] has quit [Ping timeout: 272 seconds]
15:29
swav has quit [Ping timeout: 272 seconds]
15:30
[spoiler] has joined #crystal-lang
15:31
swav has joined #crystal-lang
15:39
Oliphaunte has quit [*.net *.split]
15:39
wmoxam has quit [*.net *.split]
15:47
wmoxam has joined #crystal-lang
15:47
Oliphaunte has joined #crystal-lang
15:51
pawnbox_ has quit [Remote host closed the connection]
15:53
pawnbox has joined #crystal-lang
15:54
maxpowa has joined #crystal-lang
15:59
pawnbox has quit [Ping timeout: 258 seconds]
16:23
pawnbox has joined #crystal-lang
17:00
pawnbox has quit [Remote host closed the connection]
17:02
Philpax has quit [Ping timeout: 252 seconds]
17:07
paulcsmith_ has joined #crystal-lang
17:09
pawnbox has joined #crystal-lang
17:39
pawnbox has quit [Remote host closed the connection]
17:45
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17:53
pawnbox has joined #crystal-lang
18:03
pawnbox has quit [Remote host closed the connection]
18:04
pawnbox has joined #crystal-lang
18:08
pawnbox has quit [Remote host closed the connection]
18:09
pawnbox has joined #crystal-lang
18:11
pawnbox has quit [Remote host closed the connection]
18:26
pawnbox has joined #crystal-lang
18:35
Oliphaunte has quit [Remote host closed the connection]
18:52
paulcsmith_ has joined #crystal-lang
19:18
Oliphaunte has joined #crystal-lang
19:23
Oliphaunte has quit [Ping timeout: 250 seconds]
19:28
pawnbox has quit [Remote host closed the connection]
19:29
pawnbox has joined #crystal-lang
19:38
pawnbox has quit [Remote host closed the connection]
19:39
pawnbox has joined #crystal-lang
19:43
pawnbox has quit [Ping timeout: 260 seconds]
20:03
willl has joined #crystal-lang
20:18
Oliphaunte has joined #crystal-lang
20:29
Oliphaunte has quit [Remote host closed the connection]
21:12
Oliphaunte has joined #crystal-lang
21:13
toydestroyer has quit [Ping timeout: 264 seconds]
21:14
fnux has quit [Ping timeout: 264 seconds]
21:14
fnux has joined #crystal-lang
21:15
toydestroyer has joined #crystal-lang
21:19
paulcsmith_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:20
Oliphaunte has quit [Remote host closed the connection]
21:21
Oliphaunte has joined #crystal-lang
21:41
Oliphaunte has quit [Remote host closed the connection]
21:53
Oliphaunte has joined #crystal-lang
21:56
<
crystal-gh >
crystal/master 5c57213 Ary Borenszweig: Compiler: replace Dependencies with Array(ASTNode)...
21:56
<
crystal-gh >
crystal/master 78a7220 Ary Borenszweig: Compiler: more refactors....
22:03
<
FromGitter >
<jwoertink> Hey everyone. What's the general thoughts on commiting or ignoring the `libs` and `.shards` folders?
22:04
<
FromGitter >
<sdogruyol> ignore `libs` and `.shards`
22:04
<
FromGitter >
<sdogruyol> commit your `shard.lock`
22:04
<
jhass >
always ignore them
22:04
<
jhass >
shard.lock commit for apps, don't for libs
22:04
<
FromGitter >
<jwoertink> sweet! thanks
22:04
<
FromGitter >
<sdogruyol> yeah, thanks jhass :)
22:05
<
FromGitter >
<jwoertink> that makes sense
23:01
rolha has joined #crystal-lang
23:05
Oliphaunte has quit [Remote host closed the connection]
23:30
rolha has quit [Remote host closed the connection]
23:30
rolha has joined #crystal-lang
23:45
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]