<jeromegn>
unshadow: xml and html can be parsed just the same
ebraga has joined #crystal-lang
Philpax has quit [Ping timeout: 255 seconds]
<tilpner>
Not all html is valid xhtml.
ebraga has quit [Ping timeout: 248 seconds]
<BlaXpirit>
tilpner, i hear that libxml can parse actual html, maybe dig around for some options
<asterite>
XML.parse_html
<BlaXpirit>
uh unshadow ..
<asterite>
just didn't say it before because unshadow seems to be gone
<tilpner>
Oh, didn't see that.
ebraga has joined #crystal-lang
A124 has joined #crystal-lang
Oliphaun_ has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
ebraga has quit [Ping timeout: 265 seconds]
Oliphaunte has quit [Ping timeout: 265 seconds]
mark_661 has joined #crystal-lang
mark_66 has quit [Ping timeout: 248 seconds]
Oliphaunte has joined #crystal-lang
<RX14>
i was going to try and write up my comment about language-specific package managers into a longer article tonight but my server just ran out of space... oh well
Renich has joined #crystal-lang
<FromGitter>
<bcardiff> @RX14, you might need also to check the DNS www.rx14.co.uk & rx14.co.uk are not returning the same content. The former is used in your github profile.
<RX14>
huh
<RX14>
yeah i should probably add a DNS record for www
ebraga has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
kulelu88 has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 250 seconds]
mark_661 has quit [Remote host closed the connection]
ebraga has quit [Read error: Connection reset by peer]
<BlaXpirit>
hm i'm having such hard time with making this C API conveniently usable from Crystal
<BlaXpirit>
so it manages some structs in its memory, and occasionally it will call your function, passing a pointer to one of those structs
<BlaXpirit>
in C you can store custom data on that struct by setting a designated void* member
<BlaXpirit>
in other similar cases where I manage the allocation of the objects, it's relatively easy for me to make a neat class that can be subclassed to store any kind of data
<BlaXpirit>
but what am I supposed to do here? just expose the pointer and let the user set it?
<FromGitter>
<drosehn> Set the pointer to some routine in your wrapper-routines? and then provide a routine which crystal users can call to have your wrapper routine handle their custom data? Presumably the only custom data they'd have would be some kind of crystal object.
<FromGitter>
<drosehn> (or maybe I'm wrong about what that void* member is for)
<BlaXpirit>
i don't understand
globalkeith has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<BlaXpirit>
> can't use class variables in generic types
<BlaXpirit>
pls
<BlaXpirit>
this is the most random limitation i've ever seen
onethirtyfive has joined #crystal-lang
<jeromegn>
Anybody was able to install crystal on macOs Sierra?
<jeromegn>
as far as I can tell, it can't be done via homebrew due to LLVM stuff
<havenwood>
jeromegn: works on my machine
<jeromegn>
oh...
<havenwood>
jeromegn: what seems to be the problem?
<alex_takitani>
But I got it working by trial and error
<alex_takitani>
not sure that I'm not doing anything wrong
<RX14>
well you aren't reading 64kb
<Papierkorb>
That & operator on line 15 is useless, you're operating on a 8-Bit uint there. hash is also, I guess, a Int32
<RX14>
Papierkorb, i don't think so
pawnbox has quit [Ping timeout: 255 seconds]
<RX14>
File.size should return Int64 or UInt64
<Papierkorb>
alex_takitani: Maybe the easiest way of tinkering is through the playground. run "crystal play" and follow the URL, paste your code in there and go from there
<RX14>
File.size returns UInt64
<alex_takitani>
the problem is that i wont be able to open the file for reading there, right?
<Papierkorb>
Ah, I remembered an (old?) GH issue complaining about file size restrictions or something
<Papierkorb>
alex_takitani: You mean in the playground? You can, the working directory is the one of where you start the playground server
<Papierkorb>
RX14: Still, it's already bound to 64bit, making the & useless
<Papierkorb>
alex_takitani: Lines 12-16 and 21-26 are duplicates. Consider moving one of those into its own method and just call it twice.
<alex_takitani>
oh! awesome!
<RX14>
alex_takitani, let me see if I can get this working
<alex_takitani>
i'm testing the avi file from this link
<Papierkorb>
alex_takitani: Then, you're only operating on 64 Byte, not 64KiB. Slice(UInt64).new(8 * 1024) (8 x 8KiB == 64KiB) may have been what you wanted
<RX14>
alex_takitani, does it give the right answer?
<Papierkorb>
alex_takitani: But while that will be faster, you may have to look at which endianess the calculation expects. Great way to shoot oneself into the foot ;)