Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:12
    HertzDevil labeled #13052
  • 18:12
    HertzDevil labeled #13052
  • 18:12
    HertzDevil labeled #13052
  • 18:12
    HertzDevil opened #13052
  • 17:49
    straight-shoota closed #13051
  • 17:46
    beta-ziliani milestoned #13051
  • 17:46
    beta-ziliani milestoned #13051
  • 14:03
    beta-ziliani review_requested #13050
  • 13:59
    straight-shoota labeled #13051
  • 13:59
    straight-shoota assigned #13051
  • 13:59
    straight-shoota opened #13051
  • 13:50
    straight-shoota milestoned #13050
  • 13:50
    straight-shoota milestoned #13050
  • 13:47
    Blacksmoke16 labeled #13050
  • 13:47
    Blacksmoke16 labeled #13050
  • 13:47
    Blacksmoke16 labeled #13050
  • 13:47
    Blacksmoke16 labeled #13050
  • 13:39
    bcardiff opened #13050
  • 10:33
    straight-shoota closed #12965
  • 10:33
    straight-shoota closed #12966
From IRC (bridge bot)
@FromIRC
<Papierkorb> crystalshards.xyz doesn't know of a binding either
<kali_> i see :⁠(
<kali_> ah well, maybe i can use the pure ruby one and see if i can port it over to crystal
<kali_> but for anyone who can point me to a ready-made library, that would be great so i don't have to reinvent the wheel :⁠)
From IRC (bridge bot)
@FromIRC
<hightower2> Hey folks, is 'out' supposed to have any special recognition when not used inside lib?
<Papierkorb> out is a keyword, available "everywhere"
<hightower2> ok, that explains why I had problems naming the variable 'out' ;⁠) thanks
<Papierkorb> Yeah that'll give you funky compiler errors at call-site..
<hightower2> in 0.23 it first requires me to put an extra 'end' in the code, and then segfaults
<hightower2> 0.23.0 I mean. But in 0.23.1, it gives a more reasonable error like "out can only be used with lib funs"
<hightower2> Papierkorb, btw, I used Ruby bindings for Qt a lot (part of qtbindings project) and I submitted patches to it as well. Although that was for Qt4 and they never managed to port 'smoke' (the code parser/extractor) to work with Qt5
From IRC (bridge bot)
@FromIRC
<hightower2> But they did have some ruby-specific workarounds, to solve the problem of ruby not supporting method overloading. For example, on the first call of a Qt function, ruby args would be classified to find the most similar overload in C++, and then that method would be cached, so that the next invocation would directly use the cached version instead of doing the argument type comparison again
<Papierkorb> Yeah, Crystal can do method overloading though
<hightower2> But apart from trivia knowledge, not particularly useful/needed in the case of crystal
<hightower2> yeah
<Papierkorb> used Qt4 and later Qt5 with C++ a lot before using Ruby. Did my fair share of hacks with it too. God bless that mess. QObject::setUserData() was the best thing ever lul.
<oprypin> in python you can set arbitrary members on qt objects :⁠p
From IRC (bridge bot)
@FromIRC
<oprypin> so basically as bad as setuserdata but you dont know it's bad
From IRC (bridge bot)
@FromIRC
<w-p> anyone else out there find the subclass vs include situation a little confusing on occasion?
Nick Franken
@fridgerator
No, but my background is in Ruby, so it makes sense to me
From IRC (bridge bot)
@FromIRC
<_tsound> how would you go about adding things into an array with a loop?
<_tsound> i want to perform a loop that gets the files in a folder and reads the filename back to me
<adam12> _tsound: what have you tried?
From IRC (bridge bot)
@FromIRC
<adam12> _tsound: If you want to get files in a folder, you likely want one of the mehods in Dir, like entries
<adam12> here's the docs for Dir of course. https://crystal-lang.org/api/0.23.1/Dir.html
<adam12> I have to sign off. Late here. Night.
<_tsound> thanks for the help adam12
<_tsound> i think this will work
From IRC (bridge bot)
@FromIRC
<_tsound> i might need a virtual filesystem
Jonathan Silverman
@mixflame
is there an imagemagick library for crystal
From IRC (bridge bot)
@FromIRC
<_tsound> can you return an executable path without the executable name?
<_tsound> what i get is "/home/user/work/pname/pname"
From IRC (bridge bot)
@FromIRC
<_tsound> nvm i got it
<_tsound> Process.executable_path.to_s.chomp("/pname")
<_tsound> It's dirty, but it'll work for now
Cris Ward
@crisward
Does anyone know why crystal doesn't have an Int128 ?
Serdar Dogruyol - Sedo セド
@sdogruyol
Yeah, it doesnt for now
Cris Ward
@crisward
@sdogruyol thanks. I was going to work with IP addresses as ints, ipv6 is 128bit. It isn't a necessity for now. Good to know, thanks.
Cris Ward
@crisward
@akzhan thanks for the info.
Faustino Aguilar
@faustinoaq
Somebody is using SublimeText crystal-lang/sublime-crystal#24
Bar Hofesh
@bararchy
Me :)
Faustino Aguilar
@faustinoaq
sublime
@bararchy Do you have crystal syntax issues?
Bar Hofesh
@bararchy
Yeha, only when using ) in def arguments
So
def (bar: String) looks good
but
def (bar: Array(Int32)) looks bad
the issue is always the first ')' in the def