01:54
duane has quit [Ping timeout: 276 seconds]
02:32
f1reflyylmao has joined #crystal-lang
02:32
f1refly has quit [Ping timeout: 252 seconds]
04:01
chemist69 has quit [Ping timeout: 276 seconds]
04:02
chemist69 has joined #crystal-lang
04:21
rohitpaulk has joined #crystal-lang
04:28
_whitelogger has joined #crystal-lang
04:35
ht_ has joined #crystal-lang
04:48
rohitpaulk has quit [Ping timeout: 268 seconds]
04:49
rohitpaulk has joined #crystal-lang
04:53
early has quit [Quit: Leaving]
05:00
early` has joined #crystal-lang
05:15
ht_ has quit [Remote host closed the connection]
05:18
rohitpaulk has quit [Ping timeout: 240 seconds]
05:18
rohitpaulk has joined #crystal-lang
05:48
rohitpaulk has quit [Ping timeout: 276 seconds]
05:49
rohitpaulk has joined #crystal-lang
06:18
rohitpaulk has quit [Ping timeout: 265 seconds]
06:19
rohitpaulk has joined #crystal-lang
06:40
sorcus has quit [Ping timeout: 246 seconds]
06:48
rohitpaulk has quit [Ping timeout: 246 seconds]
06:49
rohitpaulk has joined #crystal-lang
06:51
go|dfish has joined #crystal-lang
07:02
fyber has quit [Read error: Connection reset by peer]
07:18
rohitpaulk has quit [Ping timeout: 268 seconds]
07:18
rohitpaulk has joined #crystal-lang
07:25
f1reflyylmao has quit [Ping timeout: 276 seconds]
07:43
urist__ has joined #crystal-lang
07:44
urist__ has quit [Quit: WeeChat 1.9.1]
07:46
urist__ has joined #crystal-lang
07:47
rohitpaulk has quit [Ping timeout: 240 seconds]
07:47
rohitpaulk has joined #crystal-lang
07:48
Flipez has quit [Read error: Connection reset by peer]
07:48
Flipez5 has joined #crystal-lang
07:49
Flipez5 is now known as Flipez
07:49
Flipez has quit [Client Quit]
07:49
Flipez has joined #crystal-lang
07:50
<
FromGitter >
<j8r> @TheM3tabaron on my x86-64 PC. I haven't tested the gist for a while, t
08:18
rohitpaulk has quit [Ping timeout: 276 seconds]
08:19
rohitpaulk has joined #crystal-lang
08:20
urist__ has quit [Quit: WeeChat 1.9.1]
08:28
rohitpaulk has quit [Ping timeout: 268 seconds]
08:43
maxpowa has quit [Ping timeout: 245 seconds]
08:43
sagax has quit [Remote host closed the connection]
08:45
maxpowa has joined #crystal-lang
08:51
<
FromGitter >
<j8r> why `Base64.encode` creates new lines?!
08:52
<
FromGitter >
<j8r> It's RFC compliant, but a but annoying
08:52
<
FromGitter >
<j8r> ok there is `strict_encode`
08:55
<
FromGitter >
<j8r> I submit a patch for this, the base64 digest of SH512 was multilined
09:19
alex`` has joined #crystal-lang
10:06
mps has joined #crystal-lang
10:16
hightower2 has joined #crystal-lang
10:17
<
mps >
crystal 0.31.0 still fails build with llvm8 on aarch64 in alpine linux
10:17
<
Stephie >
what was the error?
10:17
<
Stephie >
aarch64 has always been a bit broken :/
10:18
<
mps >
like with 0.30.{0,1}, don't have log handy right now
10:19
<
mps >
I'm building it with llvm5 again
10:21
<
Stephie >
if it's llvm version dependent i blame llvm :P
10:21
<
Stephie >
i'd need a log...
10:22
<
Stephie >
guess i should set up an aarch64 alpine quemu
10:23
<
mps >
you will need a lot of RAM for qemu to build it
10:23
<
mps >
llvm requires it
10:24
<
Stephie >
oh, well i can grab llvm from the repos...
10:25
<
Stephie >
thats not that much
10:25
<
mps >
though swap can help also
10:25
<
Stephie >
the linking is what ruins the LLVM build
10:25
<
Stephie >
you have to limit the parallelism of linking jobs
10:25
<
Stephie >
there's a cmake arg for it
10:25
<
Stephie >
-DLLVM_PARALLEL_LINK_JOBS=1
10:26
<
mps >
well, for me it is not issue, I have a loooot of RAM
10:36
Human_G33k has quit [Remote host closed the connection]
10:38
<
FromGitter >
<j8r> mps: @asterite has reported a bug to LLVM, we have to check if the fix is on the version shipped on Alpine
10:40
Human_G33k has joined #crystal-lang
10:41
Human_G33k has quit [Remote host closed the connection]
10:42
Human_G33k has joined #crystal-lang
10:43
<
Stephie >
that was worked around iirc
10:43
<
Stephie >
yeah, it was
10:43
<
Stephie >
the latest release will not hot that llvm bug
10:53
Human_G33k has quit [Remote host closed the connection]
10:55
Human_G33k has joined #crystal-lang
10:56
hypercore has quit [Ping timeout: 260 seconds]
10:56
Human_G33k has quit [Remote host closed the connection]
10:57
<
mps >
j8r: I remember this, but still no luck
10:57
<
Stephie >
i can't find you postying logs in the irc log
10:57
<
Stephie >
so, i'd need those again
10:59
<
mps >
Stephie: you ask j8r or me
11:00
<
Stephie >
for, what actually failed
11:00
<
mps >
you mean build log?
11:00
<
mps >
ok, I will start again with llvm8 when finish with llvm5 build
11:01
<
mps >
and, then I post build log
11:01
<
Stephie >
ideally you should have kept those around >_<
11:02
<
mps >
I have one of previous
11:03
<
Stephie >
yeah that's good
11:06
<
Stephie >
yeah thats an LLVM bug
11:06
<
Stephie >
do you build LLVM with -DENABLE_ASSERTIONS=ON?
11:07
<
Stephie >
well, -DLLVM_ENABLE_ASSERTIONS=ON
11:21
<
FromGitter >
<j8r> looks like the previous bug I had
11:24
<
mps >
but, llvm8 (8.0.1) builds correctly on aarch64
11:26
<
mps >
and I build some big programs with llvm8 on aarch64, all works fine afaik
11:35
sagax has joined #crystal-lang
11:38
rohitpaulk has joined #crystal-lang
11:48
rohitpaulk has quit [Ping timeout: 245 seconds]
11:49
rohitpaulk has joined #crystal-lang
12:04
hypercore has joined #crystal-lang
12:18
rohitpaulk has quit [Ping timeout: 265 seconds]
12:18
rohitpaulk has joined #crystal-lang
12:18
<
FromGitter >
<kingsleyh> hello - any suggestion for an easy way to have a conditional JSON - so in some cases have all the fields and in another case have a subset of the fields
12:19
<
FromGitter >
<kingsleyh> guess you can't have two JSON.mappings
12:20
<
FromGitter >
<kingsleyh> guess I will just create a json builder
12:20
<
FromGitter >
<j8r> You could use a custom converter
12:24
<
FromGitter >
<kingsleyh> something I write or is that a thing?
12:26
<
Stephie >
mps, LLVM is a big program, different compilers emit very different IR
12:26
<
Stephie >
it's likely crystal is just hitting a bug that rust and clang will never hit
12:28
<
FromGitter >
<j8r> @kingsleyh yes it is a thing
12:29
<
FromGitter >
<bew> @kingsleyh @Blacksmoke16 is working on its CrSerializer shards which can easily do that!
12:29
<
mps >
Stephie: yes, and I started to dislike llvm some time ago. but have to deal with it from time to time :\
12:33
<
Stephie >
well, yeah it's not
*great*
12:33
<
Stephie >
but it is all crystal has, really
12:48
rohitpaulk has quit [Ping timeout: 240 seconds]
12:48
rohitpaulk has joined #crystal-lang
13:17
rohitpaulk has quit [Ping timeout: 245 seconds]
13:18
rohitpaulk has joined #crystal-lang
13:20
<
FromGitter >
<kingsleyh> what is the way to get a String time from an integer time?
13:21
<
FromGitter >
<kingsleyh> in ruby its Time.at but don't have one in Crystal
13:23
<
FromGitter >
<Blacksmoke16> the shard itself is going thru a refactor atm tho, but that would be what you would want i think
13:23
<
FromGitter >
<kingsleyh> @Blacksmoke16 cool thanks :)
13:24
<
FromGitter >
<Blacksmoke16> also, got an example of what you mean by string time from integer time?
13:24
<
FromGitter >
<Blacksmoke16> like from a unix timestamp?
13:26
<
FromGitter >
<kingsleyh> ah it's `Time.unix`
13:27
<
FromGitter >
<kingsleyh> takes an int and gives a Time back
13:29
<
FromGitter >
<kingsleyh> hmm
13:30
<
FromGitter >
<kingsleyh> how do you get a Time back from: `Time.utc_now.to_unix_ms`
13:30
<
FromGitter >
<kingsleyh> that gives an Int64
13:30
<
FromGitter >
<kingsleyh> but Time.unix doesn't like that
13:30
<
FromGitter >
<kingsleyh> ah Time.unix_ms
13:31
<
FromGitter >
<Blacksmoke16> whats the point of doing that tho?
13:32
<
FromGitter >
<Blacksmoke16> i.e. why do you need to go from a time instance, to unix timestamp, back to time instance?
13:48
rohitpaulk has quit [Ping timeout: 245 seconds]
13:48
rohitpaulk has joined #crystal-lang
14:01
duane has joined #crystal-lang
14:16
rohitpaulk has quit [Ping timeout: 240 seconds]
14:17
rohitpaulk has joined #crystal-lang
14:39
hypercore has quit [Remote host closed the connection]
14:39
hypercore has joined #crystal-lang
14:40
<
FromGitter >
<bew> @Blacksmoke16 (de)serialization maybe?
14:40
<
FromGitter >
<Blacksmoke16> :shrug:
14:41
<
FromGitter >
<bew> like saving a time instance to disk or sth
14:43
pdkl has joined #crystal-lang
14:44
<
pdkl >
looking for material / blogs on luckyframework
14:48
rohitpaulk has quit [Ping timeout: 265 seconds]
14:49
rohitpaulk has joined #crystal-lang
14:54
<
FromGitter >
<bew> pdkl: the main website of the framework has lengthy guides on it iirc
15:08
<
FromGitter >
<kinxer> Anyone else having issues compiling `Channel` on 0.31.0?
15:08
<
FromGitter >
<stronny> two thread on forum already
15:09
<
FromGitter >
<kinxer> Thanks. I'll look there.
15:13
<
FromGitter >
<kinxer> Actually, my compilation issue has nothing to do with `Channel#full?` or `Channel#empty?.
15:15
<
FromGitter >
<stronny> what's the issue?
15:18
rohitpaulk has quit [Ping timeout: 276 seconds]
15:19
rohitpaulk has joined #crystal-lang
15:26
<
FromGitter >
<kinxer> I'm on OpenSUSE using the RPM distribution.
15:31
<
FromGitter >
<kinxer> It's in one of the (in-house) dependencies I'm using, so I'm trying to find what's causing it so that I can create a code sample.
15:32
rohitpaulk has quit [Ping timeout: 240 seconds]
15:37
<
FromGitter >
<kinxer> Thanks, @bew.
15:55
ht_ has joined #crystal-lang
16:03
return0e_ has quit [Read error: Connection reset by peer]
16:05
return0e has joined #crystal-lang
16:08
rohitpaulk has joined #crystal-lang
16:17
rohitpaulk has quit [Ping timeout: 240 seconds]
16:17
rohitpaulk has joined #crystal-lang
16:46
pdkl has quit [Remote host closed the connection]
16:48
rohitpaulk has quit [Ping timeout: 240 seconds]
16:48
rohitpaulk has joined #crystal-lang
16:52
HumanG33k has joined #crystal-lang
16:55
HumanG33k has quit [Remote host closed the connection]
16:55
HumanG33k has joined #crystal-lang
17:18
rohitpaulk has quit [Ping timeout: 268 seconds]
17:19
rohitpaulk has joined #crystal-lang
17:27
HumanG33k has quit [Ping timeout: 245 seconds]
17:29
HumanG33k has joined #crystal-lang
17:38
sorcus has joined #crystal-lang
17:47
hypercore has quit [Ping timeout: 260 seconds]
17:48
rohitpaulk has quit [Ping timeout: 265 seconds]
17:49
rohitpaulk has joined #crystal-lang
17:52
<
FromGitter >
<c-cube> @j8r I have a better implem for semaphores, I think
17:54
<
FromGitter >
<c-cube> interestingly, a semaphore is just a more space-efficient version of a `Channel(Nil, n)`
17:58
hightower2 has quit [Ping timeout: 268 seconds]
18:17
rohitpaulk has quit [Ping timeout: 240 seconds]
18:19
rohitpaulk has joined #crystal-lang
18:20
dannyAAM has joined #crystal-lang
18:40
rohitpaulk has quit [Read error: Connection reset by peer]
18:46
<
FromGitter >
<Blacksmoke16> should crystal be using llvm 9 on mac?
18:47
<
FromGitter >
<Blacksmoke16> nvm, looks like the llvm formula was updated to 9 a little while ago as well
18:47
<
FromGitter >
<Blacksmoke16> just an FYI
19:20
hypercore has joined #crystal-lang
19:47
gangstacat has quit [Quit: Ĝis!]
20:19
<
FromGitter >
<c-cube> is it common to use pointers explicitly @kinxer ?
20:21
<
oprypin >
c-cube, wait what, are you about to finally teach me what a semaphore means, after all these years
20:21
ht_ has quit [Remote host closed the connection]
20:22
<
FromGitter >
<c-cube> it's really just a lock that `n` threads can acquire at the same time ^^
20:22
<
FromGitter >
<kinxer> @c-cube That debug message is from within the implementation of `Channel`, not my code. I'll admit I don't (get to) program in Crystal that much day-to-day, but I've not yet had a need to use `Pointer`.
20:23
<
FromGitter >
<c-cube> oh I see, indeed it's weird to see the internals leak into a user-facing error message
20:23
<
FromGitter >
<c-cube> I thought you were trying to send that tuple into the channel
20:31
<
FromGitter >
<kinxer> Nope. It's a channel of `Network::Message`.
20:34
<
FromGitter >
<skota> Hi all, from a directory i want to get a list of subdirs excluding hidden folders (., .., .foo etc). From the docs i found i can Dir.each to get a list of subdirs/files, not sure how to filter for hidden folder? I just started learning crystal and i really like it so far
20:34
<
FromGitter >
<bew> `Dir.each_child` iirc
20:35
<
FromGitter >
<bew> ah hidden folders as well
20:35
<
hypercore >
is lucky used by anyone in production?
20:35
<
FromGitter >
<skota> aah ok...thanks @bew, i will checkout the docs
20:35
<
hypercore >
its seems pretty nice
20:36
<
FromGitter >
<Blacksmoke16> @skota cant you just do like `Dir.glob("*", match_hidden: true)`
20:36
<
FromGitter >
<Blacksmoke16> something like that
20:38
<
FromGitter >
<skota> @Blacksmoke16 thanks, i will take a look at dir.glob too. Still finding my way around the docs :-)
20:38
<
FromGitter >
<bew> Or `Dir.children.reject!(&.starts_with?('.'))` or something like that
20:44
<
FromGitter >
<skota> @bew, that worked. Thanks much.
20:47
<
FromGitter >
<Blacksmoke16> `Dir.glob("*")` does the same thing
20:47
<
FromGitter >
<Blacksmoke16> since `match_hidden` is false by default
20:57
<
FromGitter >
<skota> yep this works as well..thanks @Blacksmoke16 . BTW are there any links to resources that talk about idiomatic crystal if any?
20:59
<
FromGitter >
<skota> thanks
20:59
<
FromGitter >
<skota> bookmarked
21:00
<
FromGitter >
<Blacksmoke16> other than that the git book and api docs are the way to go
21:00
<
FromGitter >
<Blacksmoke16> asking here or the forums if you have any questions still
21:01
<
FromGitter >
<skota> will do. thx
21:16
<
FromGitter >
<j8r> we need help to add more benchmarks
21:19
<
FromGitter >
<j8r> but this isn't really about idiomatic code, but performance
21:34
<
FromGitter >
<j8r> @kinxer because I haven't got the time to do the automation stuff
21:35
<
FromGitter >
<kinxer> How do you intend for it to work once you get it up and running?
21:36
<
FromGitter >
<kinxer> It says something about other people publishing reports. How would that work and what would be the benefit?
21:38
<
FromGitter >
<j8r> the CI will generate it report, but other people can publish theirs too
21:38
<
FromGitter >
<j8r> We will have various results from various systems, OS
21:39
<
FromGitter >
<j8r> having JSON format will open the way for broader statistics, too
21:40
dostoyevsky has quit [Quit: leaving]
21:40
dostoyevsky has joined #crystal-lang
21:41
<
FromGitter >
<j8r> Please be free to contribute :)
21:42
<
FromGitter >
<kinxer> Sounds cool. :)
22:03
Raimondii has joined #crystal-lang
22:06
Raimondi has quit [Ping timeout: 245 seconds]
22:06
Raimondii is now known as Raimondi
22:14
Raimondi has quit [Quit: WeeChat 2.5: ¡Chau!]
22:15
<
FromGitter >
<c-cube> apparently, an experiment that will disappear
22:19
Raimondi has joined #crystal-lang
22:23
<
FromGitter >
<j8r> yo may be right, it is not documented at all
22:30
hypercore has quit [Ping timeout: 260 seconds]
22:32
<
FromGitter >
<c-cube> although I do think there should be more concurrency helpers
22:32
<
FromGitter >
<c-cube> typically, a kind of local pool from which you'd `spawn` tasks, and then be able to wait for all of them to complete
22:40
duane has quit [Ping timeout: 268 seconds]
22:41
hypercore has joined #crystal-lang
23:22
<
FromGitter >
<Blacksmoke16> benchmarked my deserialization method vs serializable, is 10x slower 😬
23:23
<
FromGitter >
<bew> but 10x cooler 😇
23:25
<
FromGitter >
<Blacksmoke16> <3
23:26
<
FromGitter >
<bew> how many more alloc?
23:26
<
FromGitter >
<Blacksmoke16> in reality prob is fast enough? 130k/sec
23:27
<
FromGitter >
<bew> both are fastest.... interesting 😂
23:27
<
FromGitter >
<bew> just kidding'
23:27
<
FromGitter >
<Blacksmoke16> 😉
23:28
<
FromGitter >
<bew> do you know what is slow? (x2 in memory use giving x10 in time looks odd, no?)
23:28
<
FromGitter >
<Blacksmoke16> not sure yet, been working on getting it working first
23:28
<
FromGitter >
<bew> or maybe it's just because there's more logic
23:29
<
FromGitter >
<Blacksmoke16> if i had to guess is a lot more type casting going on, because of the `JSON::Any`
23:30
<
FromGitter >
<Blacksmoke16> plus the loading of the full JSON doc into memory, since its not using pull parser directly
23:38
<
FromGitter >
<Blacksmoke16> oh wait wtf
23:38
<
FromGitter >
<Blacksmoke16> `CrSerializer 1.18M (846.98ns) (± 1.67%) 1.28kB/op fastest`
23:39
<
FromGitter >
<Blacksmoke16> oh interesting
23:39
<
FromGitter >
<bew> ?
23:39
<
FromGitter >
<Blacksmoke16> unions
23:39
<
FromGitter >
<Blacksmoke16> `String?` trying to deserialize unions is
*much* slower
23:39
<
FromGitter >
<Blacksmoke16> so theres something that can be optimized
23:43
sorcus has quit [Ping timeout: 276 seconds]
23:44
<
FromGitter >
<Blacksmoke16> look like `is_a?` calls arent super performant
23:45
<
FromGitter >
<Blacksmoke16> and by exception `as?`
23:45
<
FromGitter >
<Blacksmoke16> extension*
23:46
<
FromGitter >
<bew> might be hard to fix...
23:57
<
FromGitter >
<Blacksmoke16> yea..
23:57
<
FromGitter >
<Blacksmoke16> oh well, worry about it later