RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
non-aristotelian has quit [Quit: non-aristotelian]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #crystal-lang
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 244 seconds]
marmotini_ has quit [Ping timeout: 245 seconds]
DTZUZO_ has joined #crystal-lang
<FromGitter> <DanilaFe> Hi! can someone tell me why ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ produces: `wrong number of arguments for 'nfa_plus' (given 0, expected 1)` [https://gitter.im/crystal-lang/crystal?at=5bc7e6e2435c2a518ec3d098]
<FromGitter> <Blacksmoke16> do you also have a method called `nfa_plus` defined?
<FromGitter> <DanilaFe> Indeed
<FromGitter> <DanilaFe> in fact, it looks like it's attempting to call nfa_plus
<FromGitter> <DanilaFe> but it takes one parameter, so the call doesn't succeed
marmotini_ has joined #crystal-lang
<FromGitter> <Blacksmoke16> exactly
akaiiro has quit [Remote host closed the connection]
akaiiro has joined #crystal-lang
<FromGitter> <DanilaFe> but I'm just trying to make a hash of procs
DTZUZO_ has quit [Read error: Connection reset by peer]
<FromGitter> <Blacksmoke16> in that case i dont think those are procs
<FromGitter> <Blacksmoke16> TIL thats shorthand for defining a proc from existing method
<FromGitter> <Blacksmoke16> it looks like in your case you still have to specify the param type for your methods
<FromGitter> <Blacksmoke16> like `->nfa_plus(String)` etc
<FromGitter> <DanilaFe> ah, ok
<FromGitter> <DanilaFe> let me try that
<FromGitter> <DanilaFe> that worked
<FromGitter> <DanilaFe> thank you :)
<FromGitter> <Blacksmoke16> np :)
marmotini_ has quit [Ping timeout: 268 seconds]
DTZUZO_ has joined #crystal-lang
<FromGitter> <proyb6> Could I code in x86 assembly just like Rust could embed assembly code?
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <markrjr> @straight-shoota I have all the requisite libraries setup and can cross compile. If I make a change to something in the standard library, how do I test that? How do I get the new change into the version of crystal I'm cross compiling with?
<Heaven31415> proyb6 do you ask whether you can embed assembly in your crystal code?
<FromGitter> <markrjr> @straight-shoota Figured it out!
<FromGitter> <iambudi> what’s is ide/code editor that has better support of crystal?
<FromGitter> <Blacksmoke16> sublime has an ok plugin
<FromGitter> <Blacksmoke16> intellij has support as well, vcode too iirc
<FromGitter> <Blacksmoke16> first two are mostly just highlighting tho
<FromGitter> <Blacksmoke16> vscode*
<FromGitter> <markrjr> Wait, I take it back.
<FromGitter> <fusillicode_twitter> @straight-shoota sorry for the bother, I just wanted to thank you for your support yesterday and tell you that I found the problem in my original code (i.e. the one with nested hashes). It was related to the access of an object property that wasn't actually exposed via a getter 😅 ⏎ I'll try to switch to your suggested solution ASAP. ⏎ Anyway thanks again for all your help & suggestions! These
<FromGitter> ... are the things that makes a community great! 🙇‍♂️ 👏
rohitpaulk has joined #crystal-lang
<FromGitter> <markrjr> The system works!
<FromGitter> <Blacksmoke16> ayy
<FromGitter> <Blacksmoke16> 💯
<FromGitter> <markrjr> I actually fucked up and ran the wrong thing in that screenshot, but it still works lol.
<FromGitter> <markrjr> Number of processors on the machine for the cpu_count function in the System module.
<FromGitter> <Blacksmoke16> looks so simple ha
<FromGitter> <markrjr> Probably in the grand scheme of things, learned a lot tho.
<FromGitter> <Blacksmoke16> thats the impt part
<FromGitter> <markrjr> Yup.
<Heaven31415> There is a promising extension for VS Code, it even has a support for SCRY language server (still very immature), it would be nice for people to work on that.
rohitpaulk has quit [Ping timeout: 244 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <proyb6> Heaven31415 yup whether I could embed assembly code like Rust could
<FromGitter> <j8r> @michelson i personally prefer this syntax, clearer: `Array(Hash(String, String)).new`
<FromGitter> <bararchy> oprypin SFML got updated :) 2.5.0
<oprypin> ok?
<FromGitter> <bararchy> just thought you would be interested as I know you follow the project
sagax has joined #crystal-lang
<oprypin> thanks. that's quite old news though https://github.com/oprypin/crsfml/releases
<FromGitter> <bararchy> Oh... how comes it only now get's updated on my arch ..
<FromGitter> <bararchy> strange, I guess I missed it
<oprypin> -rw-r--r-- 1 root root 1.5M May 9 04:03 /var/cache/pacman/pkg/sfml-2.5.0-1-x86_64.pkg.tar.xz
<oprypin> -rw-r--r-- 1 root root 1.4M Jun 9 12:24 /var/cache/pacman/pkg/sfml-2.5.0-2-x86_64.pkg.tar.xz
<FromGitter> <bararchy> Oh, 2.5.1 package is out
<FromGitter> <bararchy> this makes sense now
<FromGitter> <bararchy> was released yesterday
<oprypin> i see
Heaven31415 has quit [Quit: Leaving]
ua has quit [Read error: Connection reset by peer]
ua has joined #crystal-lang
<FromGitter> <straight-shoota> @markrjr Awesome! I hope we can get you enlisted for contributing for #5430 =)
Raimondii has joined #crystal-lang
ashirase has quit [Ping timeout: 268 seconds]
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
ashirase has joined #crystal-lang
<jokke> straight-shoota i saw you filed an issue at baked_file_system about it not being tagged correctly. Is there any way to prevent shards from thinking it has to fetch the repo every time?
<jokke> i have two such shards as deps in my project and it's super annoying
<FromGitter> <bew> jokke fyi I'm also on arch :P
<jokke> traitor!
<jokke> off to irc with you!
<FromGitter> <bew> Ahahah
<jokke> i can't handle any other worldview than that all arch users use tiling window managers and tiny monospaced fonts everywhere and the only gui program they use is the browser whenever lynx isn't enough.
bew has joined #crystal-lang
<bew> I'm definitely using a tiling WM :P
<jokke> \o/
<bew> I just never really configured my weechat, and I'm also mostly on my phone, so gitter is easier
<jokke> bew: r u kidding? weechat-android is the bomb! :)
rohitpaulk has quit [Ping timeout: 272 seconds]
<bew> hmm
<bew> i know I really should try configuring a ZNC to fix all 'history' issues I have with irc, but I also don't have a server to put it on.. (one day I'll do it, I promise)
sagax has quit [Ping timeout: 252 seconds]
<oprypin> bew, just install another arch, how hard could it be
<oprypin> there's still no good irc client to connect to that ZNC though lol
<oprypin> I mean on Android&
<f1refly> configuring znc is super easy and you can do it on a 3$ vps
<f1refly> Or even better on a raspberry pi that sits on your cupboard somewhere
<jokke> znc is shit. :) What you want is weechat running on a server in tmux. Then you either connect to it directly via ssh or mosh on desktop or use weechat-android to connect to it via its relay protocol. Or glowing bear on ios.
<oprypin> terminal ui is shit though
<jokke> wut?
<jokke> there's no better ui
<jokke> well there is: no ui at all
<jokke> but for irc i'd argue you need one :)
<f1refly> terminal ui is godlike
<f1refly> I don't think you need a ui for irc at all
<jokke> well reading messages is a plus in irc :)
<oprypin> just use tail -f on logs and also open a raw socket when you want to say something
<jokke> mhm
<jokke> terminal ui is as shit as your terminal though. if your terminal doesn't have url support for example...
<oprypin> no, it's just shit in general
<FromGitter> <bew> Remote tmux is "good luck if you're on phone"
<jokke> bew: which is why i said on your phone you use weechat-relay protocol
<jokke> oprypin: i guess everyone is entitled to their opinion :)
<jokke> *have their own
<FromGitter> <bew> Yeah i heard, but doesn't this need you to have a weechat running somewhere?
<jokke> exactly
<jokke> 11:58:03 jokke | znc is shit. :) What you want is weechat running on a server in tmux. Then you either connect to it directly via ssh or mosh on desktop or use weechat-android to connect to it via its relay protocol. Or glowing bear on ios.
<FromGitter> <bew> Why znc is shit?
<jokke> because it doesn't preserve buffers in any meaningful way and sending you a bunch of buffered lines on connect is just annoying. with weechat you are sent the exact content you see in a buffer and when you scroll up, more is fetched.
<jokke> i used znc for a while and i'd never want to switch back from weechat relay
<jokke> things like marking buffers read and such are also synchronized of course
<jokke> and all your plugins
<jokke> so if you have a url shortener or something installed that's going to work on every client
<FromGitter> <bew> Interesting
<jokke> anyway. to bring things back on topic: any thing i can do to fool shards.yml to not fetching incorrectly tagged shards?
<jokke> *fool shards
<jokke> i can set the version to whatever is set in the shards.yml of the shard which will fix the problem locally but i can't push this since it will break CI.
bew has quit [Quit: WeeChat 2.2]
<FromGitter> <straight-shoota> jokke, you might try installing shards master. I'm not sure but there was an issue fixed related to refs resolving
rohitpaulk has joined #crystal-lang
marmotini_ has joined #crystal-lang
Heaven31415 has joined #crystal-lang
<Heaven31415> Gi
<Heaven31415> Hi*
<FromGitter> <fusillicode_twitter> Hi guys quick question: is there an hidden shard to help mocking an underlying db and/or a shard like the database cleaner gem? 🤔
<jokke> hm ok
Heaven31415 has quit [Quit: Leaving]
<FromGitter> <straight-shoota> why does building libevent require openssl??
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
marmotini_ has quit [Ping timeout: 244 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <yxhuvud> @straight-shoota can you set EVENT__DISABLE_OPENSSL:BOOL=OFF in the build options?
rohitpaulk has quit [Ping timeout: 252 seconds]
<RX14> that'd be cmake -DEVENT__DISABLE_OPENSSL=YES
<FromGitter> <straight-shoota> yeah, I know how to disable it. I was just wondering why it needs openssl
marmotini_ has joined #crystal-lang
<FromGitter> <vladfaust> Which is correct: "there are no jobs available" or "there is no jobs available"?
<FromGitter> <fridgerator> first one
<FromGitter> <j8r> or just "No jobs available" :)
<RX14> @straight-shoota we don't use that :)
<RX14> instead we have a custom BIO which just makes normal crystal IO calls
<FromGitter> <straight-shoota> yeah, I know. It was just a general question
<FromGitter> <proyb6> @vladfaust No opening jobs
tilpner has quit [Remote host closed the connection]
<FromGitter> <vladfaust> I'm not sure
<FromGitter> <proyb6> Sorry is “No jobs opening”
<FromGitter> <Blacksmoke16> "There are no positions currently available"
<FromGitter> <proyb6> “no positions available at this time“
<FromGitter> <proyb6> Then give user option to subscribe to your emailing...
wontruefree has joined #crystal-lang
<FromGitter> <vladfaust> That's all great, but I want either "there are no any jobs available" or "there is no any jobs available"
<FromGitter> <Blacksmoke16> neither of those is proper english, `There are no jobs available` would be fine
tilpner has joined #crystal-lang
<FromGitter> <Blacksmoke16> `are no any jobs`?
<FromGitter> <vladfaust> You don't like the word "available"?
<FromGitter> <Blacksmoke16> no im saying in your examples you had `are no any jobs`?
<FromGitter> <Blacksmoke16> the `any` isnt needed
<FromGitter> <vladfaust> I see
<jhass> funny how "there aren't any jobs available" sounds ok to me but "there are not any jobs available" does not
<FromGitter> <vladfaust> Thanks
<FromGitter> <Blacksmoke16> depending on what you are using this for, it could either be like `There are no jobs available`, for a more user facing portion/heading, or `No jobs available` if its meant for like a list of jobs but there just arent any
<FromGitter> <Blacksmoke16> context plays a roll as well
<FromGitter> <vladfaust> Yeah, it's about seeing a list of jobs and it's empty at the moment
<jhass> jobs as in employment positions or units of work a system does?
<FromGitter> <Blacksmoke16> then id keep it short and just say `no jobs available`, which gets your point across while not taking up a bunch of room
<FromGitter> <vladfaust> It's about employment positions, @jhass
<FromGitter> <vladfaust> Okay, makes sense, thanks guys
<jhass> then I'd include a call to action, "No open positions, check back soon!"
<FromGitter> <vladfaust> Yeah, sure :)
<FromGitter> <roblally_twitter> Jobs: 0
<FromGitter> <bew> \o/
Raimondii has joined #crystal-lang
<FromGitter> <Blacksmoke16> you declare an abstract class method?
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/59gd :(
<FromGitter> <Blacksmoke16> and a way to define that a subclass must have a given ivar would be nice
<FromGitter> <bajro17> how to use class method like this ⏎ ⏎ ```router.run ⏎ get "/" do ⏎ "something" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bc8b9a3ef4afc4f28947db2]
<FromGitter> <bajro17> instead of ⏎ ⏎ ```r = router.new ⏎ r.get "/" do ⏎ "something" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bc8b9db1e23486b93dd8b06]
<FromGitter> <dscottboggs_gitlab> @kingsleyh cool!
<FromGitter> <Blacksmoke16> a class method in that case would be like
<FromGitter> <Blacksmoke16> ```Router.run ⏎ Router.get "/" do ⏎ "something" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bc8bac0ef4afc4f2894865d]
<FromGitter> <Blacksmoke16> where you call it on the class name
<FromGitter> <bajro17> I try figure out how Kemal work but I cant understand
<FromGitter> <bajro17> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc8bb0c1e23486b93dd91db]
akaiiro has quit [Remote host closed the connection]
<FromGitter> <fridgerator> they're just global methods
<FromGitter> <bajro17> ohhhh thank you @fridgerator
<FromGitter> <fridgerator> 👍
<FromGitter> <chussenot> ooOps you're here @fridgerator ... thanks for your crecto-admin project
<FromGitter> <chussenot> really useful
<FromGitter> <Blacksmoke16> ^^ what nick said :p
<FromGitter> <fridgerator> great!
<FromGitter> <Blacksmoke16> `get` etc are macros that define and add the routes
<FromGitter> <bajro17> can I also check repo @fridgerator about creto-admin? :)
<FromGitter> <fridgerator> https://github.com/Crecto/crecto-admin
wontruefree has quit [Quit: bye]
<FromGitter> <bajro17> Good job :) I like it
akaiiro has joined #crystal-lang
akaiiro has quit [Ping timeout: 245 seconds]
akaiiro has joined #crystal-lang
wontruefree has joined #crystal-lang
non-aristotelian has joined #crystal-lang
<FromGitter> <jwoertink> Has anyone come across this error: `Invalid location name: America/Los_Angeles` ?
<FromGitter> <jwoertink> `Time.now(Time::Location.load("America/Los_Angeles"))`
<FromGitter> <jwoertink> What's the right way to do this?
<FromGitter> <jwoertink> ok, seems our docker container just wasn't setup with the tz stuff. So this code does work
akaiiro has quit [Ping timeout: 268 seconds]
wontruefree has quit [Quit: bye]
akaiiro has joined #crystal-lang
wontruefree has joined #crystal-lang
<FromGitter> <eliasjpr> Can you define a method that returns a type of T? Im guessing the only way to do this is with generics ⏎ ⏎ ```def hello(world : String) : T ⏎ T.new(world) ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bc8db6aef4afc4f2895678c]
<FromGitter> <Blacksmoke16> thats how you would do it yea
<FromGitter> <Blacksmoke16> only other way i can think of is define a bunch of overloads
<FromGitter> <Blacksmoke16> with each one accepting V type only and returning R
<FromGitter> <Blacksmoke16> er accepting one time each, and return type based on the input type
<FromGitter> <michelson> Hi , how can I implement the `/g` in regex contexts in crystal ?
<FromGitter> <eliasjpr> Thanks! @Blacksmoke16
<FromGitter> <Blacksmoke16> @michelson https://crystal-lang.org/api/0.26.1/String.html#gsub%28string%3AString%2C%26block%29-instance-method
wontruefree has quit [Quit: bye]
<FromGitter> <Blacksmoke16> its its own method that is a global version of `#sub`
<FromGitter> <michelson> oh I see
<FromGitter> <michelson> thanks
Heaven31415 has joined #crystal-lang
<Heaven31415> Hello everybody!
<FromGitter> <michelson> Guys, I'm trying to implement a recursive method with block. But i'm receiving an Exception: `in line 20: recursive block expansion: blocks that yield are always inlined, and this call leads to an infinite inlining ⏎ `
<FromGitter> <michelson> method is:
<FromGitter> <michelson> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bc8e57eae7be940167b58a0]
<FromGitter> <jwoertink> Hey Dr.Nick!
sevensidedmarble has joined #crystal-lang
<FromGitter> <fridgerator> classic
<FromGitter> <jwoertink> 😂
llua has left #crystal-lang ["WeeChat 2.2"]
lele_ has joined #crystal-lang
f1refly has quit [Quit: im away folks]
sagax has joined #crystal-lang
non-aristotelian has quit [Quit: non-aristotelian]
rohitpaulk has joined #crystal-lang
wontruefree has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
johndescs has quit [Ping timeout: 246 seconds]
johndescs has joined #crystal-lang
moei has quit [Quit: Leaving...]
marmotini_ has quit [Ping timeout: 252 seconds]
wontruefree has quit [Quit: bye]
f1refly has joined #crystal-lang
wontruefree has joined #crystal-lang
<FromGitter> <roblally_twitter> Anyone got any examples of using before_each with specs?
<FromGitter> <roblally_twitter> @jwoertink Thank you, sir.
<FromGitter> <jwoertink> 👍