DerisiveLogic has quit [Ping timeout: 244 seconds]
<crystal-gh>
[crystal] asterite pushed 2 new commits to master: http://git.io/vTNKJ
<crystal-gh>
crystal/master b0906e5 Ary Borenszweig: Make Tuple#map return a tuple. Fixes #683. Use tuple type restrictions in Char#in_set? and String#squeeze.
<crystal-gh>
crystal/master 856a1f1 Ary Borenszweig: Allow math operations in macros
DerisiveLogic has quit [Remote host closed the connection]
DerisiveLogic has joined #crystal-lang
waterlink1 has joined #crystal-lang
waterlink has quit [Ping timeout: 265 seconds]
havenwood has joined #crystal-lang
strcmp1 has quit [Remote host closed the connection]
strcmp1 has joined #crystal-lang
waterlink1 has quit [Ping timeout: 272 seconds]
JBat has joined #crystal-lang
BlaXpirit has joined #crystal-lang
strcmp2 has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
strcmp1 has quit [Ping timeout: 245 seconds]
sandelius has joined #crystal-lang
sandelius has quit [Client Quit]
sandelius has joined #crystal-lang
BlaXpirit has quit [Quit: Quit Konversation]
zz_Cidan is now known as Cidan
strcmp2 has quit [Ping timeout: 264 seconds]
unshadow has quit [Quit: leaving]
JBat has joined #crystal-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unshadow has joined #crystal-lang
ponga has joined #crystal-lang
<unshadow>
So, I got a small programing hardle that I need to pass, I have a file with text, I want to parse the file and build a box around it, for that I check which line is the longest, and use that as the spacer for all the other lines, but it still looks wierd (not sure why)
<unshadow>
I think crystal deps should also check if the repos under .deps has been changed and update them, or, to have a "deps --update" options to do that
<jhass>
there's crystal deps update, isn't there?
<unshadow>
Oh, is there is... sorry it wasn't in the --help nor deps --help menu
<unshadow>
jhass, Damn.. I can't get the box thingy to align :| I even exported it to an external lib for easier testing https://github.com/bararchy/text-parser
<unshadow>
Got any ideas ?
<unshadow>
I tried ljust and rjust... I can't figure out why this isn't keeping the proportions as it should
<jhass>
ljust wants the total width
<jhass>
pass just max_size (+1)
<jhass>
Also not sure why you do the to_s?
<jhass>
also why .bytesize over .size?
<jhass>
not that it should make a diff for all ascii
<unshadow>
to_s or else its a colorize class, bytesize so if UTF8 I can still compute it
<unshadow>
So, techniclly I can just chage parse(data, io=StringIO.new) to parse(data, io=STDOUT) to let it be the default right ?
<jhass>
sure
<jhass>
I don't think that's a good default since it's called parser and not printer, but your choice
<unshadow>
Hm... thats true
<unshadow>
Ok, I'm with you on that
<unshadow>
Btw, what's "spec" for ?
<jhass>
specs
<jhass>
(tests)
Ven has joined #crystal-lang
<unshadow>
What would be good tests to run against this kind of lib ? should I even bother making them ? (Sorry if i'm asking too much but I never really created a lib from scratch and I really want to know what I'm doing)
<jhass>
a bunch of known output tests, check the edge cases
<jhass>
"foo", "(enter)", "options(a,b)", "foo options(a, b)", "options(a,b,c) bar", "##redblue", "This ## is some text"
<jhass>
etc. etc.
BlaXpirit has quit [Quit: Quit Konversation]
havenwood has quit [Ping timeout: 245 seconds]
<unshadow>
Cool! it's ready including specs
<unshadow>
I really like the crystal init function
waterlink has joined #crystal-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
strcmp1 has joined #crystal-lang
<unshadow>
jhass, how would one compile to Windows ?
<jhass>
uh, checkout the branch, read the readme there, do stuff and complain that it doesn't work?
<jhass>
something in that direction
<unshadow>
jhass: ok, so there is a Windows branch, thanks I guess
<unshadow>
jhass: Thanks, it does lool better, I'll to use that
<unshadow>
it's kind of annoying that you cannot open an issue in a forked repo
<jhass>
you can, they're just disabled by default
<unshadow>
hmm didn't know that , btw is carc.in is on git ? or latest stable ?
<jhass>
it's on the version it denotes
<jhass>
so 0.7.1 by default currently
<unshadow>
Would you think about adding Crystal-git to the list ? to test new features as they are added ?
<jhass>
my main issue would be that I'd forget rebuilding it regularly
<jhass>
probably should just write a timer unit for it, but meh
<unshadow>
It could even be great way to check a new commit and see that it wont break your code :)
<unshadow>
you could just crontab a git pull
<unshadow>
hourly, or daily
<jhass>
nah, the version it runs with and that it runs is completely decoupled
<unshadow>
and build
<unshadow>
you could write a small crystal script to git pull and sleep 24 hours ;)
<jhass>
if anything I'd use a systemd timer unit
<unshadow>
the container is Ubuntu or Arch ?
<jhass>
arch
<jhass>
another issue is that it'll loose reproducability or pile up hundreds of containers
<unshadow>
In what scenerio ? if someone will try to run something while the git version is being built ?
<jhass>
no, I mean that I couldn't rerun the runs using git HEAD against the version they ran originally against
<jhass>
the failed run during container replace I'd accept, rebuilding the container takes < 5 secs
BlaXpirit has joined #crystal-lang
<unshadow>
Oh.. well whenever the pull is made, the histroy will be cleared and you cannot re-run against same version, thats the point of running against latest commit no ?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow>
ok, c u later, at last it's home time :)
<jhass>
anyway, the services focus is to provide a playground for exploring the language when you're new to it and for support things like the eval bot here, so I don't see the effort worth it
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
havenwood has quit [Ping timeout: 246 seconds]
havenwood has joined #crystal-lang
<crystal-gh>
[crystal] asterite pushed 3 new commits to master: http://git.io/vkek9
<crystal-gh>
crystal/master d0f5c32 Ary Borenszweig: Added type restriction to Array#push(*values)
<crystal-gh>
crystal/master 010c872 Ary Borenszweig: Make `Tuple#class` return a proper Class, not a tuple. This will allow doing things like `Tuple(Int32, String).from_json`
<crystal-gh>
[crystal] asterite pushed 2 new commits to master: http://git.io/vkeqC
<crystal-gh>
crystal/master 10c4163 Ary Borenszweig: Added TypeNode#length in macros: similar to the magic @length variable in macros, which later will be removed.
<crystal-gh>
crystal/master 4e4e2f3 Ary Borenszweig: Fixed cast (as) to metaclass