jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <EriKWDev> Hey guys! Any help or points on how to call this method would be greatly welcomed <3 ⏎ https://stackoverflow.com/questions/64600412/what-am-i-supposed-to-pass-to-the-following-method-in-crystal ⏎ ⏎ The gist of it is that I want to call this method: [https://gitter.im/crystal-lang/crystal?at=5f9b5c05d37a1a13d6751dd4]
<FromGitter> <Blacksmoke16> First one looks like a proc
<FromGitter> <EriKWDev> Yeah, that's what I thought too. It didn't seem to work though :/ ⏎ I tried passing: ⏎ ⏎ ```->my_write_func(Void*, UInt8*, UInt32)``` [https://gitter.im/crystal-lang/crystal?at=5f9b5e5fd5a5a635f28cb980]
<FromGitter> <EriKWDev> where my_write_func is: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9b5e758d286f20767a33d0]
<FromGitter> <Blacksmoke16> Also passing in the second arg?
<FromGitter> <EriKWDev> Well, I didn't really know what to pass there so the errors might have come from that.. xP ⏎ How do I pass a pointer to a Void?
<FromGitter> <EriKWDev> (Or is it just a pointer to anything?)
<FromGitter> <Blacksmoke16> Pointer(Void).new
<FromGitter> <EriKWDev> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9b5f75c10273610ad438b7]
<FromGitter> <EriKWDev> :/
<FromGitter> <Blacksmoke16> ::
<FromGitter> <Blacksmoke16> thinkin
<FromGitter> <Blacksmoke16> Try Pointer.null
<FromGitter> <Blacksmoke16> IDK, never really did anything with c bindings
<FromGitter> <EriKWDev> Yeah me netiher xP Or, I've used even higher abstractions, but ah well
<FromGitter> <EriKWDev> Eyyy, Pointer(Void).null worked xD ⏎ I think I'm supposed to pass something real there though..
<FromGitter> <EriKWDev> I'm waiting for a response from the maintainer at ⏎ https://github.com/TamasSzekeres/cairo-cr/issues/15
<FromGitter> <Blacksmoke16> Dunno, my assumption was void values are essentially ignored
<FromGitter> <Blacksmoke16> Like when you need to define a type but aren't using the value
<FromGitter> <EriKWDev> I'll have to read the real C implementation/documentation of Cairo's method to understand what that "closure" Pointer is supposed to be..
<FromGitter> <Blacksmoke16> Ye
<riffraff169> apparently the function is what does the actual write, it appears...
alexherbo2 has quit [Ping timeout: 272 seconds]
<FromGitter> <Blacksmoke16> @watzon what ever became of that CLI lib you were working on
sampope has joined #crystal-lang
sampope has quit [Client Quit]
deavmi has quit [Ping timeout: 264 seconds]
deavmi has joined #crystal-lang
<FromGitter> <EriKWDev> > *<riffraff169>* apparently the function is what does the actual write, it appears... ⏎ ⏎ Yeah, I want to use Cairo to generate PNGs and then pipe them out to the STDOUT. I'm having trouble now translating the data: *UInt8 nad and size: UInt32 into a Bytes that can be used with STDOUT-write ....
<FromGitter> <EriKWDev> I found this one which does exactly what I want, but it's written in C++.. ⏎ https://stackoverflow.com/a/6558994/13168253
<FromGitter> <EriKWDev> Anyone who's a bit more familiar with writing bytes to the IO..? :) I've tried a bunch of ways but don't really know what I'm doing ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9b7cedbf955735eb4a255d]
<FromGitter> <Blacksmoke16> Try like
<FromGitter> <Blacksmoke16> `STDOUT.write Slice.new data, size`
<FromGitter> <EriKWDev> I'm so dumb... I mixed the order of data and size ⏎ `bytes = Slice(UInt8).new size.to_i, data.value` xD ⏎ ⏎ Thank you so much @Blacksmoke16 <3 It works! [https://gitter.im/crystal-lang/crystal?at=5f9b7eabdc70b5159aded16c]
<FromGitter> <Blacksmoke16> well what you're doing should work too, its just a diff overload
<FromGitter> <Blacksmoke16> actually no, other overload is diff
<FromGitter> <Blacksmoke16> is the `at_exit` needed?
<FromGitter> <EriKWDev> You mean the ⏎ ⏎ ```at_exit do ⏎ GC.collect ⏎ end``` ⏎ ⏎ ...? [https://gitter.im/crystal-lang/crystal?at=5f9b81f42a35440715f3a88a]
<FromGitter> <Blacksmoke16> yea
<FromGitter> <EriKWDev> Just something the maintainer encouraged me to add
<FromGitter> <Blacksmoke16> huh, fair enough
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 264 seconds]
<FromGitter> <EriKWDev> By piping the Generated Cairo PNG to ffmpeg, I generated that^
chachasmooth has quit [Ping timeout: 260 seconds]
chachasmooth has joined #crystal-lang
<FromGitter> <Dan-Do> amazing :)
avane has quit [Quit: ZNC - https://znc.in]
avane has joined #crystal-lang
davic has quit [Ping timeout: 260 seconds]
avane has quit [Ping timeout: 264 seconds]
avane has joined #crystal-lang
davic_ has joined #crystal-lang
davic_ is now known as davic
_whitelogger has joined #crystal-lang
f1reflyylmao is now known as f1refly
<FromGitter> <ilourt> @Blacksmoke16 Yes I have already seen https://github.com/amberframework/granite/issues/358. The problem is that it is still an open issue. IMHO the problem is that it is not possible to disable validations in granit. In my case I prefer to use a dedicated lib: https://github.com/Nicolab/crystal-validator. I am more in favor of the unix philosophy of each lib do only one thing
alexherbo2 has joined #crystal-lang
frojnd has joined #crystal-lang
<frojnd> Hi there
<frojnd> This should be like the most used parser for crystal: https://github.com/kostya/myhtml/tree/master/examples Now I have problem reading docs/or source code/ My issue is Within `content = parser.css(".bt_bb_wrapper p, .bt_bb h3").map(&.inner_text).to_a` (which nicely gives me desired content) I would like to create some sort of switch statemet to match beginning of the word.
<frojnd> Like this: content.each {|content| if content.begins_with "Petition:" # do stuff}
<frojnd> Hm But why shouldn't I be able to do this...
<frojnd> I already have array with strings :) Ok Ithink this is just a matter of regex matcher
<frojnd> It even has starts_with? nice
<alexherbo2> how to display a character unicode point and the inverse?
<FromGitter> <spTorin> ```puts '\u262d' ⏎ puts '☭'.ord.to_s(16)``` [https://gitter.im/crystal-lang/crystal?at=5f9bed66c6fe0131d4c5027e]
<FromGitter> <spTorin> or what you mean?
<alexherbo2> I want \u262d as a string (user input), and convert to the character, and character to unicode code
<alexherbo2> "\\u262d" to character
<alexherbo2> and
<alexherbo2> "☭" to unicode code
<alexherbo2> what is the method to convert a string to char?
<alexherbo2> "h" -> 'h'
<jhass> "h".char_at(0)
<alexherbo2> thanks!
<FromGitter> <spTorin> or "qwe".chars
<jhass> there's also .each_char and ^
<alexherbo2> yeah I was using chars.first
<alexherbo2> but char_at is what I was looking for
<alexherbo2> and to convert the string (not char) \u{code} to the unicode point?
<jhass> well, there's many ways, also depending on your performance and correctness needs. Here's how Crystal does it whole parsing code: https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/syntax/lexer.cr#L2625
<jhass> *while
<jhass> but you might get away with just regex'ing out the hex number and to_i(16).ord'ing it
<jhass> eh, nvm the ord
_whitelogger has joined #crystal-lang
<jhass> >> p "\\uAB\\uABCD\\u{ABCDEF}".scan(/\\u(?<codepoint>[0-9a-fA-F]{2,4})|\\u\{(?<codepoint>[0-9a-fA-F]{2,8})\}/).map(&.["codepoint"].to_i(16))
<DeBot> jhass: [171, 43981, 11259375] - more at https://carc.in/#/r/9wgm
f1refly has quit [Ping timeout: 264 seconds]
f1refly has joined #crystal-lang
<FromGitter> <riffraff169> curious, i saw several structures like this in the lexer:
<FromGitter> <riffraff169> when '=' ⏎ ⏎ ``` next_char :"-="``` [https://gitter.im/crystal-lang/crystal?at=5f9bfb548d286f20767b96c7]
<FromGitter> <riffraff169> when '=' ⏎ ⏎ ``` next_char :"-="``` [https://gitter.im/crystal-lang/crystal?at=5f9bfb5c7cac87158f76ce6e]
<FromGitter> <riffraff169> ``` next_char :"-="```
<FromGitter> <riffraff169> nope...anyway
<FromGitter> <riffraff169> what does: `next_char :"-="` do?
<FromGitter> <riffraff169> specifically, the :
<FromGitter> <riffraff169> and i have to figure out how to do code quotes like others have done
<jhass> that's just a symbol
<jhass> >> :"-=".class
<DeBot> jhass: # => Symbol - https://carc.in/#/r/9wgn
<FromGitter> <riffraff169> ah thats right...i just rarely see it not with plain words...
<FromGitter> <riffraff169> made me think it was something else
<FromGitter> <riffraff169> and the debot is something that automatically gets created and posted if you do code preceded by `>>` ?
<jhass> it's an IRC bbot
<jhass> *bot
<FromGitter> <riffraff169> interesting, cool
<mps> RespiteSage: re: yesterday bug, looks like it is problem in libgc (garbage collector lib) not crystal
<frojnd> I have .ics calendar... any ideas how can I use/extract data with crystal from that file?
<FromGitter> <Blacksmoke16> Write a parser for it
<FromGitter> <Blacksmoke16> Or some fancy regex
<frojnd> How would one write a parser with no prior knowladge of writing parsers
<FromGitter> <Blacksmoke16> to google! :p
<FromGitter> <Blacksmoke16> i assume its in some structure format?
<frojnd> yes
<FromGitter> <Blacksmoke16> so i imagine you'll just iterate over each line and do something based on what the key is
<frojnd> Yeah
<FromGitter> <Blacksmoke16> @ilourt yes thats the point. The built in validation lib is whats preventing inheritance support. So by removing it, the problem is now moot
<FromGitter> <Blacksmoke16> should also checkout https://athena-framework.github.io/validator/Athena/Validator.html 😉
<FromGitter> <Blacksmoke16> granite columns support annotations, so dont need another DSL for defining them
<FromGitter> <christopherzimmerman> Is there a way to take a passed `Proc` return the same proc just with a changed signature, taking different input types?
<FromGitter> <christopherzimmerman> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9c1337d5a5a635f28e5536]
<oprypin> christopherzimmerman, no you have to implement a proc that accepts the types, converts, and calls the prior proc
<FromGitter> <christopherzimmerman> Well, it feels a bit hacky, but a macro reduces the boilerplate a bit, so now I have automatic differentiation of arbitrary functions:
<FromGitter> <christopherzimmerman> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9c17467cac87158f771694]
<oprypin> hm i might have misunderstood. now i'm actually not sure why the original code you posted wouldn't work
<FromGitter> <christopherzimmerman> I might actually look into a PR for this. I feel like a way to "reinterpret" a Proc would be really useful.
<FromGitter> <christopherzimmerman> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f9c1858b86f6407041e5445]
<oprypin> christopherzimmerman, that's not what you're doing though
<oprypin> oh
<oprypin> no actually the macro is just the best bet
<FromGitter> <emanzx> hi guys
<FromGitter> <Blacksmoke16> o/
<FromGitter> <emanzx> what is the best method to zero a file. ⏎ ⏎ ``` file.puts "" ⏎ end``` ⏎ or ``` ⏎ ⏎ file.truncate() ... [https://gitter.im/crystal-lang/crystal?at=5f9c1adbb86f6407041e5d88]
<frojnd> So I have this .ics file and using just grep I can get desired string like this: grep -B 1 "30.10.2020" file.ics | grep -Po '^(?:.*?\\n){2}\K.*?(?=\\n)' I have no idea how would I match that in crystal. First I assume I would have to read file and load it and then perform similar regex somehow?
<FromGitter> <Blacksmoke16> @emanzx id assume the latter
<FromGitter> <Blacksmoke16> given thats the purpose of the method
<FromGitter> <emanzx> ok thanks @Blacksmoke16
<FromGitter> <Blacksmoke16> could also do `File.open "test.txt", "w" &.truncate`
<FromGitter> <emanzx> > could also do `File.open "test.txt", "w" &.truncate` ⏎ ⏎ this looks better thanks.
<frojnd> Can i load result from bash script into crystal variable?
<frojnd> That would be second option :P
<FromGitter> <Blacksmoke16> frojnd, its possible to run a system command and get the result back as a string yes
<frojnd> Well splendid then
<FromGitter> <j8r> @emanzx `File.open "test.txt", "w+" { }`
<FromGitter> <Blacksmoke16> but to your initial question you'd need to read the file in then prob use https://crystal-lang.org/api/master/String.html#match(regex:Regex,pos=0):Regex::MatchData?-instance-method
<frojnd> Thank you!
<FromGitter> <j8r> From the docs: ⏎ ⏎ > w+ | Read-write, truncates existing file to zero length or creates a new file if the file doesn't exist.
<FromGitter> <Blacksmoke16> huh, fair enough
<FromGitter> <j8r> There is no difference between File.new and File.open?
<FromGitter> <j8r> by reading the code, no...
<FromGitter> <Blacksmoke16> open closes it after the block yields
<FromGitter> <j8r> the non yielding one
<FromGitter> <Blacksmoke16> otherwise you have to manually close it if you use .new
ua has quit [Ping timeout: 264 seconds]
<FromGitter> <j8r> `File.open("text.txt")` works, like `File.new("text.txt")`
<FromGitter> <Blacksmoke16> oh
<FromGitter> <Blacksmoke16> :shrug: *alias*
<oprypin> there were some discussions which one should be deprecated
deavmi has quit [Ping timeout: 268 seconds]
deavmi has joined #crystal-lang
ua has joined #crystal-lang
<FromGitter> <emanzx> guys.. if we declare a variable in a fiber and when the fiber end does the variable got cleared? or it wait for garbage collector to clear it?
<FromGitter> <Blacksmoke16> id imagine the latter
<FromGitter> <Blacksmoke16> at least the memory held by that var
<FromGitter> <emanzx> lazy question, anyway to clear the var and return the memory to system
<FromGitter> <emanzx> just var=nil?
<FromGitter> <Blacksmoke16> you can manually do a GC cycle, but whats the use case?
<FromGitter> <Blacksmoke16> whats the end goal here?
<FromGitter> <emanzx> im reading a large file
<FromGitter> <emanzx> not slurping but just take a large portion of the file and save it in variable and send to DB.. this run every minute by spawning a fiber each minutes that read the file.. the process mostly take about less than a minute.. and finish..
<FromGitter> <emanzx> I saw the memory increase and decrease
<FromGitter> <emanzx> but some of other worker I saw large memory use.. more than 2GB or memory use..
<FromGitter> <Blacksmoke16> i mean if you're loading in a 2GB file into memory its going to use at least 2GB of memory
<FromGitter> <emanzx> sadly.. its not like that..
<FromGitter> <emanzx> im only loading a 100m or less file
<FromGitter> <emanzx> but it seem increasing a lot..
<FromGitter> <emanzx> im not sure if it just my code or other dependency..
<FromGitter> <Blacksmoke16> :shrug: without seeing the code its hard to say
<FromGitter> <emanzx> haha..
<FromGitter> <emanzx> let me copy to a gist.
<FromGitter> <emanzx> pardon with the ugly and dirty code.. haha. still learning to improve my crystal lang skills..
<FromGitter> <emanzx> :-)
<FromGitter> <Blacksmoke16> wew, let me take a glance
<FromGitter> <emanzx> please.. >_<.. thanks..
<FromGitter> <Blacksmoke16> can you not leverage the `Log` module? This should be a https://crystal-lang.org/api/master/Log/Backend.html
<FromGitter> <HertzDevil> i'd start by replacing `JSON.parse` with `JSON::Serializable` since you're expecting the same fixed json format every time you read a file
<FromGitter> <Blacksmoke16> then you can tap into granite's log and it just works
<FromGitter> <Blacksmoke16> i.e. you'll be tapped into the log system and not just consuming the output
<FromGitter> <emanzx> > can you not leverage the `Log` module? This should be a https://crystal-lang.org/api/master/Log/Backend.html ⏎ ⏎ never take a look at it.. I will try to look at it..
<FromGitter> <emanzx> > i.e. you'll be tapped into the log system and not just consuming the output ⏎ ⏎ what do you mean taping on granite log?
<FromGitter> <Blacksmoke16> idk, i just saw some Granite ORM stuff and assumed you were consuming the logs generated by its logging
<FromGitter> <emanzx> no.. I actually consuming the BIND9 query log..
<FromGitter> <Blacksmoke16> and whats generating those logs? non crystal code?
<FromGitter> <emanzx> > i'd start by replacing `JSON.parse` with `JSON::Serializable` since you're expecting the same fixed json format every time you read a file ⏎ ⏎ yes.. I should have done that.. I will try to improved it soon.. thanks
<FromGitter> <emanzx> > and whats generating those logs? non crystal code? ⏎ ⏎ its BIND9 DNS server it self..
<FromGitter> <Blacksmoke16> ah alright
<FromGitter> <Blacksmoke16> nvm then, `Log` isnt what you want then
<FromGitter> <emanzx> btw while we at it I have few question.. one is this... error while i compile my code.. it seem as a warning only..
<FromGitter> <emanzx> crystal build BindQueryCollector.cr --no-debug --release -p ⏎ In /usr/local/lib/crystal/logger.cr:124:3 ⏎ ⏎ 124 | def initialize(@io : IO?, @level = Severity::INFO, @formatter = DEFAULT_FORMATTER, @progname = "") ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5f9c30c6b86f6407041e9a2f]
<FromGitter> <emanzx> 77 | # *progname* overrides a default progname set in this logger. ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ 100 | end ... [https://gitter.im/crystal-lang/crystal?at=5f9c30d5dc70b5159ae07db3]
<FromGitter> <Blacksmoke16> it means you (or one of your dependencies) are using the `Logger` type
<FromGitter> <Blacksmoke16> like `require "logger"` when thats deprecated in favor of `Log` module instead
<FromGitter> <emanzx> and if I use --static argument my code will not able to connect to the DB.. not sure if it has problem with granite code..
<FromGitter> <Blacksmoke16> are you building in an alpine image?
<FromGitter> <emanzx> > it means you (or one of your dependencies) are using the `Logger` type ⏎ ⏎ oh.. so I just need to update my dependency then cause I use none on my code :P
<FromGitter> <Blacksmoke16> prob
<FromGitter> <Blacksmoke16> assuming your deps are still maintained
<FromGitter> <emanzx> > are you building in an alpine image? ⏎ ⏎ in FreeBSD 12.1
<FromGitter> <Blacksmoke16> to build a static binary you'd have to build in alpine linux
<FromGitter> <emanzx> FreeBSD crystal still lagging.. and I do have some problem with dependency..
<FromGitter> <emanzx> > to build a static binary you'd have to build in alpine linux ⏎ ⏎ oh.. that is new to me..
<FromGitter> <emanzx> > https://crystal-lang.org/2020/02/02/alpine-based-docker-images.html ⏎ ⏎ does the binary create on alpine linux are portable? mean I can use in FreeBSD too? or it suitable for linux only.. sorry still learning on this.
<FromGitter> <Blacksmoke16> probably, assuming the same type of CPU is used afaik
<FromGitter> <emanzx> oh.. I will try then..
<FromGitter> <emanzx> but still FreeBSD sucks at Docker..
duane has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #crystal-lang
alexherbo27 has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo2 has joined #crystal-lang
alexherbo21 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo21 is now known as alexherbo2
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <emanzx> @Blacksmoke16 how big batch_size for amber/granite can accept? when I set it above 1000 it just crash with Arithmetic overflow exception error
<FromGitter> <Blacksmoke16> are you using the `.import` method?
<FromGitter> <Blacksmoke16> nvm, obs are
<FromGitter> <Blacksmoke16> can you share the error?
<FromGitter> <emanzx> yes..
<FromGitter> <emanzx> Im wraping in rescue this is the backtrace I got [Sender] Exception backtrace:["__crystal_sigfault_handler", "__crystal_sigfault_handler", "__crystal_sigfault_handler", "Fiber::swapcontext<Pointer(Fiber::Context), Pointer(Fiber::Context)>:Nil"]
<FromGitter> <Blacksmoke16> and whats the exception message?
<FromGitter> <Blacksmoke16> looks like you got a segfault, not an overflow?
<FromGitter> <emanzx> hmm..
<FromGitter> <emanzx> [Sender] Exception:Arithmetic overflow ⏎ [Sender] Exception massage:Arithmetic overflow ⏎ [Sender] Exception backtrace:["__crystal_sigfault_handler", "__crystal_sigfault_handler", "__crystal_sigfault_handler", "Fiber::swapcontext<Pointer(Fiber::Context), Pointer(Fiber::Context)>:Nil"]
<FromGitter> <Blacksmoke16> ah
<FromGitter> <Blacksmoke16> yea idk
<FromGitter> <emanzx> maybe I just remove the rescue
<FromGitter> <emanzx> Unhandled exception in spawn: Arithmetic overflow (DB::Error) ⏎ from __crystal_sigfault_handler ⏎ from __crystal_sigfault_handler ⏎ from __crystal_sigfault_handler ⏎ from Fiber::swapcontext<Pointer(Fiber::Context), Pointer(Fiber::Context)>:Nil [https://gitter.im/crystal-lang/crystal?at=5f9c5118b86f6407041ef0da]
<FromGitter> <emanzx> do I need to do something to increase the batch size? in my OS..
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <emanzx> nvm.. this mean its too much for me.. haha.. sticking with 1000 batch size..
<mps> ok, crystal on alpine is fixed by rebuilding 'gc' with ./configure option '--disable-parallel-mark'
<mps> but now with 'make compiler_spec' it sigfaults with '..Invalid memory access (signal 11) at address 0x7f72e8253378'
<mps> jhass: sorry to annoy you but I see that the 'make spec' is 'disabled' on Arch linux. did you tried it and if does it shows these problem
<jhass> mps: it's split on arch and CI because it consumes too much memory for the build environments. I don't think anybody reevaluated that recently
<jhass> --disable-parallel-mark seems like a bad solution, I guess it simply disables any threading done by libgc
<mps> jhass: that option fixes some other packages from hangs, not only crystal
<jhass> I'm just saying it seems like a crude workaround rather than a fix
<mps> we will see if the new musl 1.2.2 will have something better for this
<jhass> I'm sure it makes things considerably slower
<mps> well, looks like 'gc' have more serious issues than this, according to bug reports
<mps> main issue 'gc' doesn't use MT-forks properly, I think
<mps> and not only 'gc' but a lot of software around
companion_cube has joined #crystal-lang
<mps> btw, how core crystal developers can be contacted, except github where I don't have account (and will not open it)
v2px__ has quit [Ping timeout: 240 seconds]
davic has quit [Ping timeout: 260 seconds]
davic has joined #crystal-lang
r0bby has quit [Ping timeout: 240 seconds]
r0bby has joined #crystal-lang
<FromGitter> <Blacksmoke16> maybe the forums?
<mps> Blacksmoke16: yes, I thought about it, I'm subscribed there
louis771 has quit [Ping timeout: 260 seconds]
<avane> hi all, I'm trying to use ENV, but when I do I seem to get the following error: https://bin.snopyta.org/?f95745cc53c16981#2sVHRuA7hdV4oDVjydi2gxXiBAmD9PZ3ojYFRZJCWbXd . is this a known issue?
<FromGitter> <Blacksmoke16> Can you share your code
<avane> `ENV["LANG"] ||= "en_US.utf8"`
<FromGitter> <Blacksmoke16> Oh lol, that's it?
<FromGitter> <Blacksmoke16> The error points to something with Time
<FromGitter> <Blacksmoke16> So...has to be more to it
<avane> yeah, that's all. program compiles fine without that one line
<FromGitter> <Blacksmoke16> what crystal version?
<avane> for the record, I'm using Crystal 0.35.1, LLVM: 10.0.1
<FromGitter> <Blacksmoke16> iirc this came up before but idk if it ever was figured out. could try clearing your cache `rm -rf ~/.cache/crystal`
<FromGitter> <Blacksmoke16> and/or how did you install crystal?
<avane> ah it seems that the crystal-env shard was causing the issue. also I compiled crystal from source, I use portage.
<FromGitter> <Blacksmoke16> that would do it
<FromGitter> <j8r> This shard is old, and does not provide much.
<FromGitter> <j8r> Better copying a little chunk of code than adding a dependency