snsei has quit [Remote host closed the connection]
<FromGitter>
<paulcsmith> @elorest that looks super cool. Is that what you’re using for amber exec?
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
<FromGitter>
<elorest> It’s really close to `amber exec`, sort of developed them at the same time. Haven’t added the log option to amber exec yet though.
<FromGitter>
<paulcsmith> Very cool. That's a really great idea 👍
<FromGitter>
<watzon> crystalshards.xyz is down :(
DissonantGuile has quit [Read error: No route to host]
<FromGitter>
<johnjansen> oh good … google doesnt know about that yet apparently
<FromGitter>
<johnjansen> at least it doesnt rank for “crystalshards"
<FromGitter>
<watzon> Who's project is it anyway?
<FromGitter>
<johnjansen> i *think* it was f’s? but @jwaldrip might own the org domain from memory …
<FromGitter>
<johnjansen> id have to check
DissonantGuile has joined #crystal-lang
<FromGitter>
<johnjansen> @sdogruyol and @jwaldrip had a conversation about all this at #codecamp
DissonantGuile has quit [Read error: Connection reset by peer]
<hightower3>
Ruby's Thread#wakeup method has description: "Marks a given thread as eligible for scheduling, however it may still remain blocked on I/O.". Which method on Fiber is most similar to that in Crystal?
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
<hightower3>
When I define something as having type LibC::Char*, I notice that I must #to_s it to use it as a String. Can I avoid this and have it be done automatically?
raz has quit [Excess Flood]
raz has joined #crystal-lang
raz has quit [Changing host]
raz has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
greengriminal has joined #crystal-lang
_whitelogger has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 250 seconds]
aroaminggeek has joined #crystal-lang
saadq has quit [Ping timeout: 255 seconds]
saadq has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37_ is now known as p0p0pr37
greengriminal has quit [Quit: This computer has gone to sleep]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 252 seconds]
<FromGitter>
<picatz> This is an interesting question hightower3 👍 Specifically about Fiber: from my understanding, this really isn't public API.
<FromGitter>
<picatz> I'm not terribly sure of anything else other than not to really use it.
<FromGitter>
<picatz> For the automatic `#to_s`, wouldn't this potentially cause some issues when people don't want a string?
<FromGitter>
<picatz> I'm no expert, but, just a thought I guess.
<FromGitter>
<picatz> I'd imagine for the Fiber problem you're asking about that you would arrange your program with `spawn` and `channels` so that the flow of the program would be managing all the scheduling within crystal's internal scheduler. I have a very loose understanding of how all that works though.
<FromGitter>
<picatz> Someone else would honestly be better to answer that I'd reckon. But, I figure, it's 3am, why not type stuff in the crystal gitter. 😄
BrianOn99 has quit [Remote host closed the connection]
flaviodesousa has joined #crystal-lang
mbarbar has joined #crystal-lang
qard has joined #crystal-lang
<FromGitter>
<unreadable> Well, sfml for Now and hopefully raw OpenGL soon
<FromGitter>
<extremety1989> @unreadable okey
<FromGitter>
<unreadable> Currently I'm using three shapes for drawing the button (2 raw rounded shapes to get pixel borders and the main gradient one) + the text. Would it be better to use only one shape and obtain the 2 pixel borders and the gradient body only with the shaders?
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<r3bo0t> Do we have some equivalent library in crystal for XMPP?
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #crystal-lang
<Papierkorb_>
if crystalshards.org (no .xyz anymore!) doesn't know, probably not
<FromGitter>
<r3bo0t> @Papierkorb yeah checked their before asking here :)
<FromGitter>
<jwaldrip> @watzon the crystalshards.org domain is mine. A fork of xyz should be running there.
<FromGitter>
<jwaldrip> I can commit to keeping it running.
rohitpaulk has quit [Ping timeout: 248 seconds]
greengriminal has joined #crystal-lang
<watzon>
Ok awesome :) good to know
rohitpaulk has joined #crystal-lang
<oprypin>
Papierkorb_, what's wrong with .xyz
<Papierkorb_>
That it was down in the last days
daemonwrangler has quit [Quit: ZNC 1.6.3+deb1+jessie0 - http://znc.in]
daemonwrangler has joined #crystal-lang
<oprypin>
ok :|
faustinoaq has quit [Ping timeout: 240 seconds]
daemonwrangler has quit [Read error: Connection reset by peer]
<watzon>
Papierkorb_: That is damn impressive. Makes me want to get a switch
snsei has joined #crystal-lang
aroaminggeek has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<watzon>
How do you exit the current process in Crystal?
<watzon>
Something like `quit` or `exit`?
<hightower3>
exit(status) ?
snsei has quit [Remote host closed the connection]
<watzon>
Awesome thanks
claudiuinberlin has joined #crystal-lang
<FromGitter>
<jwaldrip> Can I add methods to a module dynamically via a macro
<oprypin>
@jwaldrip, "dynamically" and "via a macro" are incompatible terms
rohitpaulk has quit [Ping timeout: 246 seconds]
<watzon>
What would be the best way to download an image with Crystal? I imagine `HTTP::Client` would help, but I don't know how I would go from a response to a downloaded image
<FromGitter>
<jwaldrip> I mean via macro
<FromGitter>
<jwaldrip> Can I add a method to an existing module via a macro?
<FromGitter>
<jwaldrip> I am building a router and want to add methods to a shared helpers module that can then be included in other classes.
<FromGitter>
<jwaldrip> Hmm. that doesn't fit my use case. If I call a macro from within a class, I need to then add a method to a different module, NOT define a method within that class.
<FromGitter>
<johnjansen> @watzon you want IO.copy from the HTTP responses body_io from memory
<watzon>
Oh you're trying to dynamically add methods to other modules?
<FromGitter>
<jwaldrip> Correct
<FromGitter>
<johnjansen> @jwaldrip you never do anything simple do you ;-)
<FromGitter>
<extremety1989> ahha
<watzon>
@johnjansen for some reason I'm getting a `Nil assertion failed`. body_io appears to be nil
<watzon>
@jwaldrip I was trying to do something like this myself a couple weeks ago. Pretty sure it's not possible in Crystal
<FromGitter>
<jwaldrip> Well trying to make the interface for the router rails'esk in nature.
<watzon>
Yeah it's not gonna happen in Crystal haha
<FromGitter>
<jwaldrip> I was able to kinda get it working, but then I change a line of code and it breaks.
<FromGitter>
<extremety1989> @FromIRC body_io ?
<watzon>
I was trying to port ActiveSupport
<FromGitter>
<extremety1989> guys what do you knink is better for io application, using chanels or just simple websocket ?
<FromGitter>
<jwaldrip> This does not include my latest changes... but this DOES work right now.
<FromGitter>
<jwaldrip> BUT for some reason, that is not the case.
<FromGitter>
<johnjansen> god, i always have trouble reading macros ;-)
<FromGitter>
<johnjansen> @jwaldrip BTW admiral saved my life yesterday … so thanks ;-)
<FromGitter>
<jwaldrip> Lol, glad to hear it.
<FromGitter>
<jwaldrip> Another macro beast ;-)
snsei has joined #crystal-lang
<FromGitter>
<fridgerator> @extremety1989 websockets communicate over a TCP connection, channels has nothing to do with this
<FromGitter>
<fridgerator> not sure what your question means
<FromGitter>
<extremety1989> @fridgerator i saw exemple with socket + chanels in crystal-lang documentation, just wanted to know wich technique is best
<FromGitter>
<fridgerator> for doing what?
<FromGitter>
<extremety1989> real time application
<FromGitter>
<fridgerator> web application?
<FromGitter>
<extremety1989> yeah
<FromGitter>
<fridgerator> then you're going to have to use websockets
<FromGitter>
<jwaldrip> When running that command I get the help page, with no guidance on what I did wrong.
<FromGitter>
<jwaldrip> also `-c ./src/sample.cr:5` does not work.
<Papierkorb>
that :5 thing most likely isn't your "programfile"
<FromGitter>
<jwaldrip> without the line number, it also does not work.
<Papierkorb>
the programfile is your main file. the -c then points to a file inside your program, with line and column numbers attached.
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter>
<jwaldrip> So `crystal tool expand -c ./src/sample.cr:5:1 ./src/sample.cr` is the correct format
<FromGitter>
<jwaldrip> That is not made very clear by the help.
<Papierkorb>
It is.
<Papierkorb>
I figured it out just by that.
<Papierkorb>
And I'm no core contributor.
<FromGitter>
<jwaldrip> It does not indicate that LOC is required.
rohitpaulk has quit [Ping timeout: 240 seconds]
<Papierkorb>
> Cursor location with LOC as path/to/file.cr:line:column
<Papierkorb>
There it is
<FromGitter>
<jwaldrip> I see that. But it doesnt say required.
<FromGitter>
<jwaldrip> Nor does it tell me I am missing a flag when running it.
<Papierkorb>
If it was optional, it would've been in square brackets
<FromGitter>
<jwaldrip> you mean `[options]`?
<Papierkorb>
like that
<FromGitter>
<jwaldrip> That would denote that SOME options were needed, but not which ones.
<Papierkorb>
the program doesn't fail, hence it's optional
<Papierkorb>
I don't get what you're ranting on about
<Papierkorb>
the tool uses canonical --help notation
<FromGitter>
<jwaldrip> Just saying, it could be made more clear
<FromGitter>
<jwaldrip> I didnt say anything about that.
<Papierkorb>
only thing it could do is saying you're missing -c if nothings passed. But apart from that, the --help is fine.
<FromGitter>
<jwaldrip> Thats all I am saying
<FromGitter>
<jwaldrip> It wasnt clear to me what I was missing... and a simple line saying `-c was required` would have been helpful.
<FromGitter>
<jwaldrip> (also, I ranted because you made a statement that "I figured it out by reading the help" thus insinuating that I should have also been able to figure it out.)
<Papierkorb>
k
<Yxhuvud>
he is definitely not the only one that has had trouble figuring out that command.
greengriminal has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
<FromGitter>
<elorest> Would it be possible to turn Crystal Lang into a Not for Profit Organization for Tax purposes. LetsEncrypt managed to pull this off?
<FromGitter>
<extremety1989> guys i need help,
<FromGitter>
<extremety1989> how can i add params here
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
aroaminggeek has joined #crystal-lang
vivus has joined #crystal-lang
baweaver has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
snsei has quit [Remote host closed the connection]
<FromGitter>
<sam0x17> @elorest traditionally its been super hard to get non-profit status as a software-oriented organization. Let's Encrypt pulled it off because it was a public spectacle pulled off by industry big wigs with very good lawyers. That said, I would definitely give it a try at least.
<FromGitter>
<sam0x17> there's a slashdot article somewhere about how lots of orgs get denied if they are software-oriented
<FromGitter>
<elorest> Makes sense. Just a thought.
<FromGitter>
<elorest> I have 4 empty spots in my google suite account.
<FromGitter>
<jwaldrip> When does "can't declare module dynamically" get thrown. Looking at the specs, it looks like its only when a module is within an if statement or a def. Can a module be defined within a macro that is called from another macro?
<FromGitter>
<jwaldrip> I must have my module definition in a conditional. Im combing through my real code.
<FromGitter>
<jwaldrip> That was just an example to ensure that it does in fact work.
<Papierkorb>
Macros aren't magic in what they do. They operate on the AST, so everything you can express as AST (Which is any kind of full Crystal expression), you can express as macro. Everything that doesn't operate on the AST in turn can't create new AST nodes to be processed. The latter kind are things that run at run-time, e.g., `if`, `def`, etc
<Papierkorb>
That's all regarding their rule-set on what they can/can't do. If something fits in one category and it's not possible, it's likely a bug.
<FromGitter>
<HCLarsen> Hey guys, I get an error whenever I try to run or build a crystal program with the --release flag. Is this a known issue, or should I open an issue on github?
<FromGitter>
<crisward> it's known
<FromGitter>
<HCLarsen> Ok, thanks.
<Papierkorb>
Mac?
<hightower3>
Is it possible to load a shared lib compiled from Crystal into a C-native program?
<FromGitter>
<crisward> use --no-debug as a work around
<FromGitter>
<HCLarsen> Ubuntu.
<RX14>
hightower3, yes but you can't really do anything once you've loaded it
<FromGitter>
<HCLarsen> @crisward do you mean using --no-debug as well as --relase, or in place of it?
<FromGitter>
<crisward> yep
<FromGitter>
<crisward> as well
<RX14>
also you can't load 2 crystal shared libs into a C program
<FromGitter>
<HCLarsen> Ok, thanks.
<RX14>
which kinda makes it pointless
<RX14>
so just dont do it hightower3
<hightower3>
RX14, haha, interesting, OK, thanks
<FromGitter>
<HCLarsen> Worked perfectly, thanks.
<FromGitter>
<crisward> It's an llvm bug, hopefully sorted in the next release.