ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
<FromGitter> <faustinoaq> > Is there any way to install shards in a global path? ⏎ ⏎ @eliasjpr see https://github.com/crystal-lang/shards/pull/126
<FromGitter> <eliasjpr> 👍🏻👌🏻
<Papierkorb> I still don't understand why the "confused" github emoticon looks like :|
<Papierkorb> Which isn't confused
<Papierkorb> But more like "Meh"
<Papierkorb> I mean there'd be something like (._.)?
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter> <raydf> hi, is there any ftp shard?
scalp42 has quit [Ping timeout: 260 seconds]
<FromGitter> <faustinoaq> @raydf No, FTP is on Roadmap https://github.com/crystal-lang/crystal/wiki/Roadmap#standard-library
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
DTZUZO has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 240 seconds]
<FromGitter> <r3bo0t> > @r3bo0t I think I've been using my fork while waiting for this. Not sure why it wasn't merged, I did all the updates per the feedback I think. I have a habit of forking, fixing, using my fork then swapping over when it's merged. Kemal is super quick to merge stuff in, other shards can be a bit slower. Sometimes they have something conflicting going on I know nothing about, but feel free to use my fork while
<FromGitter> ... you wait. ⏎ thanks
<FromGitter> <raydf> thanks @faustinoaq
snsei has joined #crystal-lang
_whitelogger has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
alex`` has joined #crystal-lang
Cyrus has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
brianon99 has joined #crystal-lang
balduin has quit [Ping timeout: 248 seconds]
balduin has joined #crystal-lang
balduin has left #crystal-lang [#crystal-lang]
<FromGitter> <vonKingsley> @raydf I created an FTP shard https://github.com/vonKingsley/ftp
dannyAAM has quit [Ping timeout: 248 seconds]
dannyAAM has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
csk157 has joined #crystal-lang
latemus is now known as waveprop
csk157 has quit [Ping timeout: 248 seconds]
brianon99 has quit [Ping timeout: 260 seconds]
alex`` has joined #crystal-lang
dannyAAM has quit [Ping timeout: 240 seconds]
dannyAAM has joined #crystal-lang
snsei has joined #crystal-lang
DissonantGu1le has quit [Ping timeout: 258 seconds]
jqzollmqqe has joined #crystal-lang
jqzollmqqe has quit [Remote host closed the connection]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
olbat has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
tdc has joined #crystal-lang
mark_66 has joined #crystal-lang
tdc_ has joined #crystal-lang
<FromGitter> <sdogruyol> Morning everyone
tdc has quit [Ping timeout: 258 seconds]
snsei has joined #crystal-lang
<Groogy_> Morning
thews has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> Morning
<FromGitter> <faustinoaq> https://tio.run/#crystal is a good playground
<FromGitter> <faustinoaq> Good features and performance, also provides copy & paste for code golfing 👍
thews has joined #crystal-lang
thews has quit [Changing host]
thews has joined #crystal-lang
nikkkk has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
<FromGitter> <bararchy> Good morning all :):)
<FromGitter> <sdogruyol> how is everyone doing
<FromGitter> <bararchy> Today is my last day at current job, so I'm kinda excited :) haha
<FromGitter> <sdogruyol> you're going full time with Crystal, right?
<FromGitter> <bararchy> Yap, going to be awsome !
<Groogy_> Bararchy you were starting your own right?
<FromGitter> <bararchy> yeha
<Groogy_> Good luck :)
<FromGitter> <bararchy> Thanks man
Groogy_ is now known as Groogy
<RX14> thats so cool, good luck also
<FromGitter> <sdogruyol> @bararchy awesome, good luck 👍
<FromGitter> <bararchy> Thanks guys ):
snsei has quit [Remote host closed the connection]
<RX14> what sort of thing are you working on?
<FromGitter> <sdogruyol> hey @RX14 great job on HN comments
<FromGitter> <sdogruyol> thank you
<RX14> np
<FromGitter> <sdogruyol> we've got a great traction, 114 comments and 242 points
<FromGitter> <ansarizafar> @bararchy Considering the current state of development, Is it safe to go full-time with Crystal?
<Groogy> RX14 and sdogruyol, what you talking about?
<FromGitter> <yxhuvud> groogy, see https://news.ycombinator.com/item?id=15574714
<FromGitter> <bararchy> RX14: our site is still under development but you can have a quick peak here: https://neuralegionsite.wixsite.com/neuralegion
<FromGitter> <bararchy> @ansarizafar Well, I'm a Crystal pioneer :) it's not ready yet is not a good enough excuse for me ;)
<FromGitter> <bararchy> For us and what we need it's more then good enough
<FromGitter> <sdogruyol> @Groogy https://news.ycombinator.com/item?id=15574714
<FromGitter> <sdogruyol> we're on top of HN for the weekend
<FromGitter> <sdogruyol> got some great traction
<FromGitter> <sdogruyol> @bararchy way to go 💪
Ven has joined #crystal-lang
Ven is now known as Guest36397
<FromGitter> <bararchy> BTW, did thinLTO got merged ?
<FromGitter> <bararchy> quicker --release compile times are really cool to have
<livcd> bararchy: good luck! wish i would have the courage :)
<FromGitter> <bararchy> Thanks livecd :)
<FromGitter> <sdogruyol> @bararchy nope, not yet
<FromGitter> <sdogruyol> it requires some tweaks in arch and other linux based distros
<FromGitter> <sdogruyol> https://llvm.org/docs/GoldPlugin.html
<FromGitter> <sdogruyol> doesn't work out of the box
<FromGitter> <bararchy> Oh
<livcd> i wish i could just fast forward +3 years to see Crystal and Nim take off :D
<FromGitter> <sdogruyol> @livcd we're getting there :P
<FromGitter> <bararchy> livcd we got a great traction, great adopters and a great dev team and comuunity, we will be there faster then you think
<livcd> i know right...exciting times :P
csk157 has joined #crystal-lang
<txdv> Groogy_: lacks ls
<txdv> sosrry misclick
Guest36397 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
csk157 has quit [Ping timeout: 258 seconds]
<FromGitter> <unreadable> morning all, great news and a shiny day as well
<FromGitter> <bararchy> Morning @unreadable
<FromGitter> <unreadable> sup, very nice website theme, I always find it hard to get a good design for my projects oO
<FromGitter> <bararchy> @unreadable thanks man :)
<FromGitter> <ansarizafar> @bararchy Are you using Crystal to render html on your site?
buggs has joined #crystal-lang
<FromGitter> <bararchy> @ansarizafar Our site is just wix, not something we handle ourselvs, but, our product is running Kemal for web managment and UI
<FromGitter> <bararchy> looks like this: https://twitter.com/NeuraLegion/status/920671497844396035
<FromGitter> <bararchy> on the right
csk157 has joined #crystal-lang
<FromGitter> <sdogruyol> @bararchy awesome 👍
<FromGitter> <sdogruyol> morning and have a great week @unreadable
csk157 has quit [Ping timeout: 255 seconds]
<FromGitter> <bararchy> htop
<FromGitter> <bararchy> oops
<FromGitter> <bararchy> lol
<Groogy> When you are fixing a bug in a bug ridden part of the system and before you get to it even to reproduce it you get about 10 asserts.... RIP
<Groogy> who wrote this D:
<FromGitter> <sdogruyol> well said lol
<Groogy> So like, someone added a bunch of asserts to make sure his system worked
<Groogy> then wrote so the asserts trigger saying something is wrong.... but it still works so he didn't bother fixing the asserts <_<
<FromGitter> <sdogruyol> crap++
tdc_ has quit [Read error: Connection reset by peer]
tdc_ has joined #crystal-lang
<livcd> bararchy: what other languages do you use with Nexploit ?
alex`` has quit [Ping timeout: 246 seconds]
<FromGitter> <bararchy> livcd Only Crystal, and ofc some CSS\HTML for the web UI
<FromGitter> <bararchy> oh, we have some Crystal bindings to C, for lib-fann and other libs
<FromGitter> <r3bo0t> @crisward @sdogruyol does https://github.com/crystal-lang/crystal-mysql allow to use `utf8mb4 charset`?
<FromGitter> <r3bo0t> I can see 1-2 open tickets/issues on GitHub for the same, which are still in open state.
<FromGitter> <sdogruyol> @r3bo0t I don't use mysql
<FromGitter> <r3bo0t> postgres user :)
<Papierkorb> having to use mysql should be disallowed under the human rights carta
<Groogy> Hmm wahat's so bad with mysql? (Mind you I've only used it for fun and as the easiest entry to databases)
<Papierkorb> It's not ACID (except when it is), it's not correct (except when it is)
<Papierkorb> The big issue is that it even allows to have a non-strict mode. Shit like it truncating strings to "make them fit" when storing them
<Papierkorb> That is so beyond anything reasonable, I don't even know where to start
<Papierkorb> It's so bad that all of these "oversights" create a gazillion of security issues in products using that junk. Like https://mathiasbynens.be/notes/mysql-utf8mb4
<Papierkorb> Groogy: Oh ever heard of this "ACID" stuff with this "SQL standard"? Which allows you to do custom CONSTRAINT checks on your data? For data consistency? Yeah um, no one needs that according to MySQL: https://dev.mysql.com/doc/refman/8.0/en/create-table.html
<Papierkorb> > The CHECK clause is parsed but ignored by all storage engines. See Section 1.8.2.3, “Foreign Key Differences”.
<crystal-gh> [crystal] RX14 closed pull request #4367: [WIP] Add ThinLTO for LLVM >= 4.0 (master...thin-lto) https://git.io/v9R3T
<Papierkorb> Groogy: Postgres is the answer really. It's correct and simply so much more powerful. It's a bit behind in the distributed deployment stuff because of all the guarantees it gives you. They're working on it.
<Groogy> ah cool
<Groogy> Yeah those things would never really hit me when playing around with stuff for fun
<Groogy> but definetly see the problem
<Papierkorb> yeah for toying around you don't care. issue is when that toy project wants to become a non-toy project
<FromGitter> <ansarizafar> Papierkorb What's your opinion about cockroachdb?
<Papierkorb> Never tried/used it
<FromGitter> <r3bo0t> @ Papierkorb with this 30-40 % of startups should stop running :P
<Papierkorb> Startups aren't really known for overall code quality (Security is a part of that)
csk157 has joined #crystal-lang
<FromGitter> <r3bo0t> true, totally agree with that.
csk157 has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#e8aca96 (master - Add ThinLTO for LLVM >= 4.0 (#4367)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/294822112
<DeBot_> https://github.com/crystal-lang/crystal/pull/4367 ([WIP] Add ThinLTO for LLVM >= 4.0)
<FromGitter> <raydf> nice @vonKingsley, could you add this to awesome-crystal (https://github.com/veelenga/awesome-crystal), i couldn't find it at first with google and that repository.
<FromGitter> <raydf> maybe i can help you and create a PR.
<FromGitter> <bew> @raydf http://crystalshards.xyz/?filter=ftp
<Papierkorb> huh is crystalshards.xyz using canvas fingerprints?
<FromGitter> <bew> Wut? What's that
<Papierkorb> the extension blocking that just went nuts
<Papierkorb> bew, basically, by rendering stuff into a <canvas>, and then reading it back out, you get a fingerprint as every single browser installation renders it every so slightly different
<FromGitter> <bew> Oh wow
<FromGitter> <bew> They'r unlikely to do that i think
<Papierkorb> I just wish that extension would give me a stacktrace or something
<FromGitter> <monouser7dig> a short question: I'd like to get all files in all subfolders of a folder, Dir.foreach has ben deprecated? an dI can't figure out how to use glob
d1rewolf has joined #crystal-lang
<robacarp> monouser7dig what is your confusion with glob?
csk157 has joined #crystal-lang
<robacarp> assuming you want to list the files in "my_stuff": `Dir['my_stuff/*']`
<robacarp> Just musing here, but it looks like you colud use Dir.entries too
csk157 has quit [Ping timeout: 240 seconds]
fiete has quit [Ping timeout: 240 seconds]
fiete has joined #crystal-lang
<FromGitter> <sdogruyol> how can I make Crystal use a different `ld`
<Papierkorb> temporarily or always?
<FromGitter> <sdogruyol> temporarily
<FromGitter> <sdogruyol> I want to try https://llvm.org/docs/GoldPlugin.html
<Papierkorb> build with --cross-compile, then link the .o manually
<FromGitter> <sdogruyol> ugh, isn't there something like ld-path e.g?
<Papierkorb> dunno. it takes more time to figure that out than to copy/paste the output line and do the necessary modifications to it for goLD
<FromGitter> <sdogruyol> I want to test out if having goLD actually improves compile times in release
<FromGitter> <sdogruyol> so if I do cross-compile with current ld I can't actually test that
<Papierkorb> mh?
<Papierkorb> if you cross-compile, it doesn't link anything
<FromGitter> <sdogruyol> but it'd be really hard to measure like that..
<Papierkorb> `time`
<Papierkorb> the compile time doesn't change by using a different linker
<Papierkorb> thus, the time from using the output command without any mods can be compared to what you try it against
<FromGitter> <sdogruyol> this was temporary ld
jrwren has left #crystal-lang [#crystal-lang]
<FromGitter> <sdogruyol> how about permanently changing it?
<Papierkorb> dunno, it's probably hard-coded to use gcc on linux
<Papierkorb> so, check docs for that
<FromGitter> <sdogruyol> thanks @papierkorb
<FromGitter> <Rinkana> Is there any documentation on the default macro calls like `macro included`?
<Groogy> when it comes to macros there isn't much documentation. The best is probably the API docs under Crystal::Macros
<Papierkorb> And its entire subtree ^
<Papierkorb> Rinkana, the hooks are documented in the language docs
DTZUZO has quit [Ping timeout: 240 seconds]
<Papierkorb> So, Ubuntu 14.04s Clang4.0 is different to what everyone else, including later Ubuntus, call Clang4.0
<RX14> @sdogruyol you need to find out the argument to cc to make it use gold
<Papierkorb> Which breaks functionality in bindgen. Fantastic.
<RX14> then set "CC=cc -ld=gold" or whatever the actual argument it
<FromGitter> <monouser7dig> robacarp thanks works
<RX14> seems like CC="cc -fuse-ld=gold"
Ven has joined #crystal-lang
<RX14> Papierkorb, how is it different?
<RX14> like do they just not have some features?
Ven is now known as Guest42207
<Papierkorb> RX14: For some reason, the clang-tool can't grab the default value of a string, and thus can't serialize it.
<Papierkorb> Clang5.0 has the same issue on that OS?!
<RX14> lol
<RX14> build llvm from source
<RX14> its not toooo hard
<Papierkorb> on travis
<RX14> oops
<RX14> blame distro packagers
<Papierkorb> Don't worry, I already do
<RX14> tfw debian packagers have so many patches to packages they created a new tool to manage them
<RX14> maybe they should just rethink their packaging
<Papierkorb> Mh, does anybody know how I could get a more recent ubuntu on travis? Anything more recent than that should do, Ubuntu 16.04 works fine e.g.
<RX14> docker
<RX14> it seems
<RX14> or similar/chroot
<Papierkorb> Mh yeah I'll try that
<RX14> it seems terrible to me that travis is stuck on a really old ubuntu
<Papierkorb> I mean I don't wanna complain about travis, it's fantastic how they offer a free CI to everyone who asks
<Papierkorb> Ubuntu is at fault here
<Papierkorb> I can replicate the issue on a local Ubuntu14.04 VM
<RX14> well travis is fantastic
<RX14> but it doesn't mean I can't think it's a shame they dont offer 16.04 or other LTS releases
<FromGitter> <yxhuvud> semaphore is also stuck in 14.04 as far as I can see :/
<RX14> i need to start work on crystal CI aagin
<RX14> it's gotten so so much easier with AWS per-second billing
<Papierkorb> RX14: Funnily enough, that bug doesn't actually break the generated bindings. The normal user probably wouldn't even notice lol
<RX14> i can just spawn a VM each time without worrying
kornelgora has joined #crystal-lang
<kornelgora> What the best way to start learning crystal for web development. Is necessary to know boostrap ,sass, javascript before dive into crystal or i can just start which it and dont need to know javascript or something else? I know html and css .What framework should i use for crystal amber or kemal?? What framework should i use for crystal amber or kemal??
DTZUZO has joined #crystal-lang
<robacarp> kornelgora: it depends, both have their tradeoffs. What other language and framework experience do you have?
<FromGitter> <kornel_gora_twitter> i have program in swift for ios only
<kornelgora> i have program in swift for ios only
<kornelgora> no web exprerience i just learn hmtl and css
<robacarp> I see. Then I would probably start with Kemal. Kemal is a little more transparent about what's going on.
<FromGitter> <kornel_gora_twitter> should i know also javascript , sass, boostrap ??
<kornelgora> should i know also javascript , sass, boostrap
<robacarp> fyi, you don't have to post in gitter and irc. Either one is fine
<robacarp> all of those technologies are relevant to building websites and applications. I'd advise you learn as you go.
<robacarp> If appearance is important to you, learning to use bootstrap is a good way to get a decent appearance without much manual javascript/css
kornelgora has quit [Quit: Page closed]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 240 seconds]
mark_66 has quit [Remote host closed the connection]
<FromGitter> <sdogruyol> @RX14 I'm curious how Rust simplified that
<FromGitter> <sdogruyol> https://github.com/cs01/gdbgui
<FromGitter> <sdogruyol> since this is compatible with Rust maybe we can use it for Crystal too?
<Papierkorb> what's wrong with Kgdb?
<Papierkorb> sdogruyol, gdb has worked just fine for years with crystal. Including all GUIs.
<Papierkorb> uargh, browser based
Guest42207 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> C'mon travis, do your thing, I didn't want to waste the whole day on this
Ven has joined #crystal-lang
Ven is now known as Guest45092
Guest45092 is now known as Ven``
<FromGitter> <unreadable> Jesus man, 83 C# keywords without the specials one loool
<FromGitter> <unreadable> I'm pretty sure there's c# devs here. What did you go for it instead of Java??
<Groogy> Xbox 360 development
<Groogy> Is why I used it
<FromGitter> <fridgerator> Unity3D
<FromGitter> <mgarciaisaia> Hi there! For everyone that was mentioning the 0.24.0 pre-release missing its changelog - we mixed something wrong within Github, so not only the changelog BUT THE PACKAGES were missing. I'm about to republish them - sorry about that!
<Papierkorb> mgarciaisaia, could you add you (and/or others) to the README in a section who's responsible for the release and distribution stuff? Possibly with contact addresses?
<FromGitter> <mgarciaisaia> Republished: https://github.com/crystal-lang/crystal/releases/tag/0.24.0 ⏎ Please keep in mind this is a *pre-release*. Don't use it in production, and log any issue you find on the repo 💙
<RX14> if it's a pre-release it should be 0.24.0-pre1
<RX14> otherwise you'd have to change the tag if we rerelease
<RX14> which isn't a good idea
<FromGitter> <mgarciaisaia> @Papierkorb I've built this one myself, but haven't been involved in the development. What do you think having that data in the release could help for? (to picture the use case, I mean)
<RX14> ideally CI is responsible for releases
<RX14> push a tag and go
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vFqem
<crystal-gh> crystal/master 6aa40d0 Ary Borenszweig: Merge pull request #5208 from MakeNowJust/fix/crystal/parse-regex-starting-semicolon-after-call...
<crystal-gh> crystal/master 0c22505 TSUYUSATO Kitsune: Fix to parse regex starting with ';' after call
<Papierkorb> mgarciaisaia, To know where to direct questions on a release or release-related issues. Also as contact for re-distributors (e.g., for various linux distros)
csk157 has joined #crystal-lang
<RX14> @mgarciaisaia you should probably open a WIP PR with that changelog in so that people can review it
<RX14> I think that a changelog PR is a good way to communicate about a track releases in general
<RX14> so before -pre1 of a release we should open a changelog PR which cherry picks the changelog commit and tag it 0.x.x-pre1
<FromGitter> <sdogruyol> I'd like that too
<RX14> then we discuss the release and the changelog and once we reach a consesnsus we merge the PR, tag it
<RX14> and release
<crystal-gh> [crystal] RX14 closed pull request #5202: Don't lookup super method on the top level (master...super) https://git.io/vFIgj
csk157 has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] asterite closed pull request #5198: Format: fix indentation of last comment of exception handler block (master...fix/crystal-format/5196-format-last-comment-of-exception-handler-block) https://git.io/vFI3z
alex`` has joined #crystal-lang
<FromGitter> <mgarciaisaia> Not sure if I've tried, but *I think* there was an issue with setting Crystal version to anything else but `x.y.z` - ie, funny things happen when you add `-something`. But it very well be just my imagination.
<RX14> well it needs to be fixed
<FromGitter> <mgarciaisaia> I'm totally in for using a `-preX`, but prefered to have *a* build now, then make it better 🆗
<RX14> because having multiple "0.24.0" compilers with different commits is a terrible idea
<FromGitter> <mgarciaisaia> Totally agree - the stable release will probably be 0.24.1, or whatever
<RX14> ouch
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 248 seconds]
<FromGitter> <crisward> @r3bo0t You can't use utf8mb4 as utf8 is hard coded. But you could patch it. Think the issue kind of explains how. Though if you need more help just ask. Sorry for slow replies, at work gmt 8-5.
<FromGitter> <asterite> I personally think we should just release 0.24.0 without -pre1 stuff
<FromGitter> <asterite> After all we are still 0.x
<FromGitter> <asterite> We release, if something breaks (and it's most often the case) we release a 0.24.1 with the fixes
<FromGitter> <asterite> After 1.0 we can think of a more conservative approach
d1rewolf has quit [Ping timeout: 264 seconds]
<travis-ci> crystal-lang/crystal#748afe5 (master - Merge pull request #5198 from MakeNowJust/fix/crystal-format/5196-format-last-comment-of-exception-handler-block): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/294969795
<DeBot_> https://github.com/crystal-lang/crystal/pull/5198 (Format: fix indentation of last comment of exception handler block)
<jsn-> is there any way to do a non-local break in crystal? something like "break <label>" in Nim or at least like "throw" in ruby?
<FromGitter> <bew> Like raising an exception?
<jsn-> no, not quite
<Groogy> what is the end result you want?
<Groogy> i.e what behaviour?
<Yxhuvud> usually the way to do it is by breaking out a method and using return.
<jsn-> yeah, i use the return trick for now, but it's unnatural; less so than abusing exceptions, but still
<Groogy> .... eh return is not a trick...
<Groogy> return does exactly the same thing from what I understand?
<jsn-> of course it's a trick; i just have a nested loop, there's no other reasons to extract inner parts of it as a method other than to be able to use return to break out of more than one loop layer
d1rewolf has joined #crystal-lang
<jsn-> ...so, i see that the answer is "no", apparently
<Groogy> I'm not really following you, I do that all the time?
<Groogy> I have the value I want, no point to keep going and just return
tdc_ has quit [Read error: Connection reset by peer]
tdc has joined #crystal-lang
<Groogy> anyway off to home! cya guys!
<FromGitter> <Rinkana> Is there a method_missing macro hook that also works for static methods?
d1rewolf has quit [Quit: WeeChat 1.7]
<59NAA7LJ5> [crystal] RX14 pushed 1 new commit to master: https://git.io/vFqmJ
<59NAA7LJ5> crystal/master fbab3a3 Sokolov Yura: Secure hash function (#5146)...
<7GHAAZ09L> [crystal] RX14 closed pull request #5146: Alternative hash function (master...althasher) https://git.io/vd5D9
<DeBot_> https://github.com/crystal-lang/crystal/pull/5146 (Alternative hash function)
<DeBot_> https://github.com/crystal-lang/crystal/pull/5146 (Alternative hash function)
<FromGitter> <mgarciaisaia> We're not 1.0 yet, but I think it's nice we start walking the release process path *before* getting stable - so we make any mistakes now instead of then
<RX14> jsn-, no there's no way of doing it but nested loops with break is really an antipattern and you should be breaking out into a function
<RX14> what exactly is the usecase?
<RX14> also i really should have called that "HashDOS-resistant hash function" not secure
barbro has joined #crystal-lang
barbro has quit [Client Quit]
<RX14> yup definitely looks cleaner with the function factoried out
<RX14> just needs better naming
<jsn-> well, i disagree :)
<jsn-> not about this specific code sample; it's obviously a one-off thing for a puzzle series, it doesn't matter
<jsn-> but sometimes you do need to break out of some inner loop, and named break and/or throw/catch can be very useful
<jsn-> throw/catch is obviously much more powerful, it allows non-local returns and stuff
<RX14> also horribly slow
csk157 has joined #crystal-lang
<jsn-> still faster than exceptions if done right, though
<jsn-> actually, local throw/catch doesn't have to be slow at all, it's up to compiler to optimize it
<RX14> sure but its also confusing having both exceptions and throw/catch imo
<RX14> also its confusing in general
<jsn-> that's imo largely because "throw/catch" is not good naming
<jsn-> dunno
<jsn-> nothing confusing about named breaks, though :)
<RX14> well it is confusing
<RX14> break overall is a bit confusing
<jsn-> but yeah, you'll need labels, and they do not look nice
waveprop has quit [Ping timeout: 248 seconds]
waveprop has joined #crystal-lang
waveprop is now known as Guest72603
<jsn-> matz understands those things, he had continuations in ruby originally
<jsn-> but they didn't survive 1.9 transition
<jsn-> i guess a poor man's implementation of throw/catch can be put togather via a custom exception class, a throw() function and a catch macro
vivus has joined #crystal-lang
<vivus> what is the latest version of crystal?
<RX14> 0.32.1
<RX14> 0.23.1*
<jsn-> o_O
<RX14> says it in the topic
<vivus> woops, missed that
<vivus> sorry
<RX14> np
<RX14> there's a prerelease 0.24.0
<RX14> and a 0.24.x will be out in a few days
<RX14> but currently the latest release is 0.23.0
<RX14> but currently the latest release is 0.23.1
<RX14> damnit
<vivus> when I run: `amber db create` I get: Connection refused: postgres://postgres:@localhost:5432/postgres
<vivus> I changed my postgres user from root to postgres
<Papierkorb> empty password?
<vivus> yes, empty password
<Papierkorb> Or did you mean no password?
Ven`` has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> wow #5146
<DeBot_> https://github.com/crystal-lang/crystal/pull/5146 (Alternative hash function)
<FromGitter> <sdogruyol> 1) 24.0 is gonna be the biggest release
<jsn-> huh, so String#scan doesn't do overlapping matches
<Papierkorb> that would be super unexpected if it did
<vivus> what should I change this line to: database: postgres://postgres:@localhost:5432/weblog_development ?
<jsn-> yeah, perhaps it would, come to think about it
nikkkk has quit [Read error: Connection reset by peer]
<jsn-> actually, silly me; it does overlapping matches, if you have a non-consuming regexp
nikkkk has joined #crystal-lang
<FromGitter> <unreadable> could somehow operators be used with templates??
<Papierkorb> mh?
<Papierkorb> What do you mean?
<FromGitter> <unreadable> > wow #5146
<DeBot_> https://github.com/crystal-lang/crystal/pull/5146 (Alternative hash function)
<FromGitter> <unreadable> thanks for sharing!
<FromGitter> <unreadable> I'm doing a matrix
<FromGitter> <unreadable> looking to use *, /, +, - and so one with a template
<FromGitter> <unreadable> if possible
<FromGitter> <unreadable> else abort
<Papierkorb> "with a template"?
<FromGitter> <unreadable> generics
<FromGitter> <unreadable> that's how you call it here
<FromGitter> <unreadable> right
<FromGitter> <unreadable> C++ calls them templates, my bad
<Papierkorb> And your issue being what now?
<Papierkorb> operators and generics work just fine
<FromGitter> <unreadable> > could somehow operators be used with templates??
<Papierkorb> Have you tried?
<FromGitter> <unreadable> something like math<type, operator> ...
<Papierkorb> No
<FromGitter> <unreadable> That's what I was looking for
<Papierkorb> generic arguments have to be either a Type or an integer
nikkkk has quit [Quit: Textual IRC Client: www.textualapp.com]
<vivus> can anyone tell me what I should adjust the following to: database: postgres://root:@localhost:5432/myblog_development ??
Ven has joined #crystal-lang
Ven is now known as Guest9063
<Papierkorb> vivus: can you access the db using that exact uri by passing it to the `psql` tool?
<Yxhuvud> unreadable: we do have method overloads with different signatures though, so perhaps that can help
<Papierkorb> my money's still on the extra colon
<vivus> Papierkorb: so I try: psql postgres://root:@localhost:5432/myblog_development and then when it asks for password, I hit enter and it comes back with: psql: fe_sendauth: no password supplied
<Papierkorb> vivus: Have you tried removing the extra colon?
<vivus> Papierkorb: this is copy/pasted from the generated database.yaml file
<Papierkorb> Never used amber
RickHull has joined #crystal-lang
tdc has quit [Read error: Connection reset by peer]
<FromGitter> <fridgerator> vivus, what are the credentials for your postgres installation?
<FromGitter> <fridgerator> well... you dont have to type them here, but they need to be in that url correctly
<vivus> @fridgerator : user https://help.ubuntu.com/community/PostgreSQL user = postgres pw: [blank]
tdc has joined #crystal-lang
<FromGitter> <fridgerator> try `postgres://localhost:5342/myblog_development` or `postgres://postgres@localhost:5342/myblog_development`
<vivus> so the database doesn't exist ...
<vivus> but that makes sense, as this is db create
<Papierkorb> you can't connect to a DB that doesn't exist yet
<Papierkorb> Even if you intend to issue a CREATE DATABASE shortly after
<vivus> so I changed the command like so: postgres://postgres@localhost:5342/myblog_development , but the error doesn't make sense: Connection refused: postgres://postgres@localhost:5342/postgres , why does it choose /postgres ?
<Papierkorb> that's the default DB
<Papierkorb> And conn refused? Is your postgres running at all?
<vivus> Papierkorb: yes, postgres is running
<Papierkorb> On the day I fiddle with travis they're having issues that affect me durr https://www.traviscistatus.com/incidents/4vdl52d28hz3
<RX14> lovely to see that macos upgrades break basic things like dns lol
<FromGitter> <fridgerator> are you able to `psql -h localhost -U postgres` ?
<RX14> Papierkorb, to be fair to you travis is having issues most days
<Papierkorb> mh?
alex`` has quit [Ping timeout: 264 seconds]
tdc has quit [Ping timeout: 240 seconds]
<vivus> will asking in the rails channel work or is this a framework issue?
<FromGitter> <fridgerator> its an issue with your database setup
<FromGitter> <fridgerator> are you able to connect to your local postgres server at all using `psql` ?
<vivus> @fridgerator , yep, postgres isn't the issue.
<vivus> @fridgerator , in database.yaml , how do I store the postgres pw?
<FromGitter> <fridgerator> `postgres://user:password@server:port/database`
<vivus> @fridgerator , got it to work. so the issue is that I had a blank password (as the instructions told me), but I needed to add a password
<FromGitter> <fridgerator> great!
<vivus> thank you sir
<vivus> can I duplicate a rails application almost similar to amber?
csk157 has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] RX14 closed pull request #5104: Add (Half)SipHash PRF and integrate it into Crystal::Hasher (master...std-siphash) https://git.io/vdrxe
<FromGitter> <coderhs> Hi there. Whats the equivalent of `“test”.to_sym` in crystal?
<Papierkorb> There's none.
<Papierkorb> Symbols are compile-time constructs and can't be 'constructed' at run-time
<FromGitter> <coderhs> Okay. got it.
vivus has quit [Quit: Leaving]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #crystal-lang
<RX14> Papierkorb, do you think we could remove symbols and just use Enums? I never use symbols myself
<Papierkorb> I can't tell you when I used a Symbol, outside of a NamedTuple, and that's already rare
<RX14> well i use namedtuples a lot
<RX14> but apart from that
<RX14> we could remove symbols and just use
<RX14> hmm
<Papierkorb> String
<RX14> idk what we could use
<RX14> well String is a pain
<Papierkorb> For named tuples?
<RX14> because it requires an allocation
<FromGitter> <paulcsmith> I think one use-case where symbols make sense to people are when using macros. Though they could use just the bare word, I think it's a bit odd for people new to the language. Maybe that's fine though
<RX14> actuallt for constant strings it's always just going to be a pointer
<Papierkorb> Ah well, then people would expect `named_tuple["foo#{bar}"]` to work, that's no good
<RX14> well
<RX14> you can use a symbol in a variable
<RX14> can't you
<Papierkorb> Yeah but you can't do `named_tuple[:"foo#{bar}"]` right now
Guest9063 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> That's fine, and is expected. But if you were to replace symbols with strings (to get rid of symbols) in named tuples, that'd be hella confusing
<RX14> well is it really?
<Papierkorb> It looks completely like a Hash
<RX14> because you can already pass in arbitrary sumbols
<RX14> which might not match
<FromGitter> <coderhs> Are symbols in crystal like that in ruby? In ruby we use symbol for memory efficiency.
<Papierkorb> Yes, but you don't expect to be able to create them at runtime RX14
<Papierkorb> coderhs, Symbols are barely useful in Crystal
<RX14> @coderhs constant strings == ruby symbol
<FromGitter> <coderhs> gotcha.
<RX14> crystal symbol == better
<Papierkorb> I think it's fine to have them overall, but treat them like when they were introduced to Ruby: As implementation detail
<RX14> but not really like what i said at all
<RX14> so yeah
<RX14> property :foo annoys me though lol
<Papierkorb> Though I only see Ruby-ists asking for String#to_sym and friends. Which makes sense
<RX14> people using property, etc like attr_accessor
<Papierkorb> We could change property/getter/setter to raise on SymbolLiteral
<Papierkorb> Because yeah, that notation really sucks
<RX14> as soon as you want to spec a type you need to change anwyay lol
<Papierkorb> https://travis-ci.org/Papierkorb/bindgen/jobs/295042394 Oh, took only 43mins. looks like their network is still a bit toast lol
<Papierkorb> Finally that thing is CI'd
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
minus has quit [Quit: Bye]
Ven has joined #crystal-lang
Ven is now known as Guest73995
<travis-ci> crystal-lang/crystal#fbab3a3 (master - Secure hash function (#5146)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/294999508
<DeBot_> https://github.com/crystal-lang/crystal/pull/5146 (Alternative hash function)
minus has joined #crystal-lang
<Papierkorb> Is there no crystal package for fedora?
Guest73995 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 258 seconds]
<robacarp> Is there an easy way to view the rendered code for a macro?
<Papierkorb> drop `{% debug() %}` anywhere into it
<Papierkorb> .. actually, I always put it at the end, never tried not putting it there
<robacarp> thats great, thanks Papierkorb
<Papierkorb> .... And now the bindgen spec finds a bug in the C++ part of the integration test
<Papierkorb> oh the irony