jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.1 | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
Cidan is now known as zz_Cidan
zz_Cidan is now known as Cidan
bcardiff has quit [Quit: Leaving.]
Cidan is now known as zz_Cidan
datanoise has quit [Ping timeout: 245 seconds]
Sadin has quit [Ping timeout: 246 seconds]
Dreamer3 has joined #crystal-lang
zz_Cidan is now known as Cidan
vikaton has joined #crystal-lang
neovintage has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DerisiveLogic has joined #crystal-lang
datanoise has joined #crystal-lang
waterlink has joined #crystal-lang
waterlink1 has quit [Ping timeout: 256 seconds]
kulelu88 has quit [Quit: Leaving]
datanoise has quit [Ping timeout: 258 seconds]
datanoise has joined #crystal-lang
vikaton has quit []
Sadin has joined #crystal-lang
willlll has quit [Quit: willlll]
bcardiff has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
Sadin has quit [Quit: Leaving]
waterlink has quit [Quit: Leaving.]
Sadin has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
datanoise has joined #crystal-lang
JBat has joined #crystal-lang
notfowl is now known as fowl
willlll has joined #crystal-lang
willlll has quit [Quit: willlll]
Sadin has quit [Ping timeout: 276 seconds]
Sadin has joined #crystal-lang
Sadin has quit [Read error: Connection reset by peer]
willlll has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
willlll has quit [Quit: willlll]
willlll has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
BlaXpirit has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 252 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 264 seconds]
JBat has joined #crystal-lang
Cidan is now known as zz_Cidan
orliesaurus has quit [Ping timeout: 256 seconds]
a| has joined #crystal-lang
a| is now known as Guest37248
datanoise has joined #crystal-lang
willlll has quit [Quit: willlll]
datanoise has quit [Ping timeout: 246 seconds]
BlaXpirit has quit [Quit: Quit Konversation]
Guest37248 is now known as orliesaurus
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 244 seconds]
vikaton has joined #crystal-lang
<vikaton> Hi
<vikaton> I have a ViewController in my storyboard
<vikaton> though I'm having trouble to get the source file of that ViewController in Xcode
<vikaton> any help?
<jhass> this doesn't sound like Crystal?
<vikaton> lol
<vikaton> I apologize :/
datanoise has joined #crystal-lang
vikaton has quit []
havenwood has quit [Ping timeout: 252 seconds]
bcardiff has joined #crystal-lang
DerisiveLogic has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 272 seconds]
BlaXpirit has joined #crystal-lang
havenwood has joined #crystal-lang
<jhass> who's up for breaking http://carc.in ?
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 256 seconds]
<BlaXpirit> well my trivial thing didnt break it
asterite has joined #crystal-lang
<BlaXpirit> gj
<asterite> jhass: awesome!!
<asterite> I tried mandelbrot and pig from the samples and they work
<asterite> Now we need: 1. ajax and stay in the same page, 2. codemirror
<asterite> It would also be cool to optionall get the asm and llvm-ir output
<asterite> I think the perlin noise sample breaks it
<asterite> maybe it takes too long without the --release flag
<jhass> yeah, I shouldn't filter the timeout messages I guess :P
<jhass> btw you can press n and submit with Ctrl+Enter
<jhass> and it's just a frontend to the api, POST /run_requests with {"run_request:" {"language": "crystal", "version": "0.7.1", "code": "puts 1"}} ;)
<asterite> Nice :-)
<asterite> What did you use for the backend in the end?
<jhass> crystal ;P
<jhass> moonshine as "framework" (quickly writing my own router wouldn't have been much more work in retrospect :/)
JBat has quit [Quit: Computer has gone to sleep.]
datanoise has quit [Ping timeout: 255 seconds]
DerisiveLogic has joined #crystal-lang
<asterite> Yeah... for simple things like this doing HTTP::Server.new and some regex based on the Request is simpler, I think
<asterite> But cool that you are using Crystal as the backend ;-)
<jhass> asterite: btw if you want it to respond to run.crystal-lang.org or something, just say so ;)
<asterite> I'll let waj know, he's the sysadmin :-P
<asterite> Maybe play.crystal-lang.org, everyone is using "play"...
willlll has joined #crystal-lang
willlll has quit [Client Quit]
willlll has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
datanoise has joined #crystal-lang
willlll has quit [Quit: willlll]
bcardiff has joined #crystal-lang
willlll has joined #crystal-lang
willlll has quit [Client Quit]
bcardiff1 has quit [Ping timeout: 245 seconds]
willlll has joined #crystal-lang
datanoise has quit [Ping timeout: 276 seconds]
willlll has quit [Quit: willlll]
datanoise has joined #crystal-lang
willlll has joined #crystal-lang
shama has joined #crystal-lang
zz_Cidan is now known as Cidan
willlll has quit [Quit: willlll]
Cidan is now known as zz_Cidan
willlll has joined #crystal-lang
zz_Cidan is now known as Cidan
havenwood has quit [Ping timeout: 276 seconds]
asterite has joined #crystal-lang
<asterite> BlaXpirit: ping
<willlll> I figured out how to get the API I wanted, single method call with a tuple of types, and a query, and return an array of tupeles so you don’t have to cast afterwards https://github.com/will/crystal-pg/pull/4
<asterite> willlll: cool! I hope we can improve tuple reflection in the future to make this easier
<willlll> The key was a macro def to do the as casting as a method ( https://github.com/will/crystal-pg/pull/4/files#diff-969f35358d47a599b0fa43f1689d977cR1 ) and then a macro to gernate methdos for each arity ( https://github.com/will/crystal-pg/pull/4/files#diff-3c8769b037d158cad1d97e1ee07dff69R75 )
<willlll> I think shipping with like 1 to 32 arity out of the box, then letting people add more if they need it in their project
<jhass> the macro is called only on classes, right? how about adding it only to class Class ?
<willlll> good call, yeah.
<jhass> but nice one, indeed
<asterite> BlaXpirit: well, if you ever read this, there's this project that a friend of mine is doing, https://github.com/asterite/nes.cr , and he tried using crsfml and it crashes. Maybe you can make it work, should be easy, just draw pixels on the screen. You can use main_sdl.cr as a basis (it probably crashes because of a misuse of crsfml, but I don't know)
<asterite> BlaXpirit: oh, and you should try it with super mario 1 or excite bike, not sure it works with other games yet
<fowl> Ew so he used SDL1
<fowl> Oh this is the nes emulator everyone is copying
<asterite> fowl: what do you mean copying?
<fowl> Like the same thing exists in go, c, etc, they're ports of ports
<asterite> I don't know, I saw my friend with documents about the 6502 cpu... I don't think he copied the code from another language
willlll has quit [Quit: willlll]
asterite has quit [Ping timeout: 246 seconds]
<BlaXpirit> asterite, i don't understand what crashes
<BlaXpirit> sure i am here, just that people always find that precise time when i go away
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 256 seconds]
asterite has joined #crystal-lang
<asterite> BlaXpirit: how do I render an image into a window?
<asterite> I'm using set_pixel on the image, but then I don't know how to copy that into the RenderWindow
<BlaXpirit> asterite, Image is in RAM, Texture is in GPU
<asterite> And how to pass the image to the texture?
<asterite> Oh, update
<asterite> I was trying to use a sprite instead of a texture
<BlaXpirit> that would be Texture.from_image
<BlaXpirit> aand sure enough, i don't have the default argument in place
<BlaXpirit> hmm seems convoluted indeed :/
<BlaXpirit> so you have to transform image into texture, then make a sprite with a texture in every frame
<BlaXpirit> SFML would let you update the texture with the new image, but not CSFML
<BlaXpirit> oh nevermind
<BlaXpirit> that's what update is for
<asterite> but it's not working well
<BlaXpirit> > texture.update window, 0, 0 - that's definitely something wrong
<BlaXpirit> asterite, try removing that line?
<BlaXpirit> oh you actually need to replace it with window.draw sprite
<BlaXpirit> oh you actually need to replace it with window.draw Sprite.new(texture)
<BlaXpirit> one could bypass the Image by using update with an array of pixels
<asterite> Cool. The image texture sprite things seems to work, but I get a black screen... but the problem is in another part, not sfml related, I'm doing something wrong
<BlaXpirit> appears so indeed
<BlaXpirit> sure seems weird to me to store pixels in columns
<BlaXpirit> asterite, another thing is, I never see anything written to @shown....
willlll has joined #crystal-lang
<asterite> There's a line @current, @shown = @shown, @current
<BlaXpirit> well that was a brain fart. i just ignored that line
<asterite> but that gave me the clue why it's not working
<asterite> I still don't know... but I don't know in what condition that swap happens
<BlaXpirit> but if sdl version works..
<BlaXpirit> asterite, nes.step duh
<asterite> Oh, yes... I forgot it in the gist
<asterite> but even with nes.step it doesn't work :(
<asterite> I'll try to ask my friend
<BlaXpirit> but surely it must be something here if sdl works
<BlaXpirit> ok i'm pretty sure that last_rendered_at part is relevant
<asterite> Well, finally I got it working, so I don't know why he said it crashes
<BlaXpirit> asterite, displays the title screen?
<asterite> Yes :)
<BlaXpirit> good
<asterite> And just like in sdl, poll events takes a lot of time. But I don't know if one should poll events in every loop cycle
havenwood has joined #crystal-lang
waterlink has joined #crystal-lang
<BlaXpirit> asterite, what do you mean it takes a lot of time
<BlaXpirit> vertical sync limits it to like 60 fps or whatever your display is
<BlaXpirit> window.display operation blocks according to framerate dictated by the limit or vsync
<BlaXpirit> and events should be polled during every display frame, not every NES frame
<BlaXpirit> so basically there should be as many event checks as .display calls
<asterite> So, every time you draw a frame you also check events?
<BlaXpirit> asterite, yes
<asterite> Cool, let me check
<asterite> Works really nice now :)
<BlaXpirit> another thing is, SFML can tell you "is a button pressed"
waterlink has quit [Ping timeout: 264 seconds]
<BlaXpirit> not sure if that's worth adapting the current program to
<BlaXpirit> normal events works just fine
<asterite> BlaXpirit: thanks for your help :)
asterite has quit [Quit: Page closed]
willlll has quit [Quit: willlll]
bcardiff1 has quit [Quit: Leaving.]
waterlink has joined #crystal-lang
willlll has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 244 seconds]
leafybas_ has quit [Ping timeout: 272 seconds]
broz has joined #crystal-lang
DeBot has quit [Quit: Crystal]
DeBot has joined #crystal-lang
<jhass> >> "yay"
<DeBot> jhass: "yay" - http://carc.in/#/r/p
<BlaXpirit> not so sure about this..
willlll has quit [Quit: willlll]
<jhass> >> puts "but\nnice\nmultiline\noutput"
<DeBot> jhass: but - http://carc.in/#/r/q
<BlaXpirit> all I see is more spam here and having to click through
datanoise has quit [Ping timeout: 255 seconds]
<jhass> spam? :o
<BlaXpirit> flood, whatever it's called. tons of messages related to this bot
<jhass> ? how would it be more?
<BlaXpirit> +links .........
<BlaXpirit> the least you can do is make the pastes editable
<jhass> does your client highlight you if a link is posted or what?
<BlaXpirit> no, but it's highlighted literally with blue color and underline
<BlaXpirit> and links look bad enough without it
<jhass> well, complain to an op if it annoys you that much
willlll has joined #crystal-lang
<jhass> I think you're a bit hypocritical there
<BlaXpirit> don't see how
<jhass> me neither, except from the other side
<BlaXpirit> >> printf "5"
<DeBot> BlaXpirit: 5nil - http://carc.in/#/r/w
datanoise has joined #crystal-lang
leafybasil has joined #crystal-lang
sfcgeorge has joined #crystal-lang
bcardiff has joined #crystal-lang
DeBot has quit [Quit: Crystal]
DeBot has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
willlll has quit [Quit: willlll]
sfcgeorge has quit [Quit: Textual IRC Client: www.textualapp.com]
willlll has joined #crystal-lang
jeromegn has quit [Quit: jeromegn]
bcardiff has quit [Quit: Leaving.]
Sadin has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vUh2F
<crystal-gh> crystal/master 7f2bc10 Ary Borenszweig: Generate less code for an Expressions node (fixed regression)
willlll has quit [Quit: willlll]
willlll has joined #crystal-lang
jtarchie has quit [Quit: Connection closed for inactivity]
<travis-ci> manastech/crystal#2340 (master - 7f2bc10 : Ary Borenszweig): The build was fixed.