<jhass>
in the monolithic kernel design like linux has it, you'll need a kernel driver that at least exposes stuff for a userspace driver
<jhass>
doubt it's realistic to write a kernel driver in crystal
<unshadow>
Can a kernel driver be only written in C ?
Guest22835 has quit [Ping timeout: 250 seconds]
<jhass>
idk, I never did investigate much into that
<jhass>
you're better off in ##linux or something
<unshadow>
Thats interesting, I'll check there :)
<unshadow>
I started reading "What every programmer should know about memory" , it gave me some thing to wonder about
a^ has joined #crystal-lang
ponga has joined #crystal-lang
<unshadow>
Is I see that crystal init app and crystal init lib does exactly the same thing ha ?
<unshadow>
jhass: topic saying Crystal 0.7.1
<jhass>
unshadow: /msg ChanServ access #crystal-lang list
<unshadow>
Oh... becuase -!- Topic set by jhass [~jhass@aeshna.de] [Sat May 9 03:24:04 2015]
<jhass>
yeah, since reasons...
<unshadow>
ok. waj, bcardiff or asterite , Topic needs to be changed
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 244 seconds]
BlaXpirit has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
ismaelga has joined #crystal-lang
Ven has joined #crystal-lang
strcmp1 has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
<unshadow>
What would you say is the best config file parser ? I used TOML until now but I heard that there are better ones out there, I personally kinda hate XML's.
<jhass>
I yet have to try toml, but I think I like it better if the target audience is end users
<jhass>
if the target audience is devs I wouldn't bother the dep and use json
<unshadow>
I want to create something in the background to work with a Web front, DB is an overkill as I only have like 5-10 configurable values, you would recommend json for that ?
<jhass>
or even just hardcode constants into your code
<jhass>
well I guess somebody should contribute toml_mapping there ;)
<jhass>
no
<jhass>
that would just move those potential errors to runtime
<jhass>
having them compile time makes your program a lot more robust
<BlaXpirit>
i'm gonna need some help trying to use lib/bindings generator
<jhass>
I doubt anybody besides their authors really used them :/
<BlaXpirit>
cc: error: /Toolchains/XcodeDefault.xctoolchain/usr/lib: No such file or directory
<BlaXpirit>
whatever, removed that line, it compiled
<BlaXpirit>
oh, it actually attempts something but /usr/include/stdlib.h:32:10: fatal error: 'stddef.h' file not found
<unshadow>
sometime the potential errors should be handeled by the developers, I know this is making me program a more stable software by making sure no type issues, but, sometime I am 100% sure of the type, or at lest dont care for errors, and those if ... if .. if... checks are very ugly in the code
<jhass>
then use a cast as shown in the readme
<jhass>
for type unions that's just a runtime check
<jhass>
I'd say s/limited/developed on/, which boils down to my earlier point, only tested/used by their authors
<BlaXpirit>
so what can i do then
<BlaXpirit>
probably best to make my own, huh
<jhass>
stddef.h seems to be shipped by like every compiler, I guess instead of removing earlier line, you should replace it with the directory containing that file on your system
<unshadow>
jhass: where in the readme ?
<jhass>
unshadow: of crystal-toml? seriously?
havenwood has joined #crystal-lang
<BlaXpirit>
jhass, oh that may be it
<vikaton>
h
<jhass>
unshadow: as Hash
<jhass>
that's a cast
<unshadow>
haaaa
<jhass>
I showed that earlier for JSON.parse
<unshadow>
owner = toml["owner"] as Hash
<unshadow>
the f**k do I know what a cast is hahaha, yeha I remmber your example, I'll use that, thanks ;)
<unshadow>
lets say I have pid_path = config["main_process"]["pid_path"], I did config = TOML.... as Hash, now, can I do "config["main_process"] as Hash["pid_path"] ?
<jhass>
yeah
<unshadow>
cool thanks
<jhass>
might even be able to (x[y] as Hash)[z]
<jhass>
never tried
<unshadow>
can I do "12" as Int32 instead of "12".to_i ?
<unshadow>
>> a = "12" as Int32; puts a.class
<DeBot>
unshadow: Error in line 4: can't cast String to Int32 - http://carc.in/#/r/t1
<unshadow>
oh
<jhass>
conversion != casting
<jhass>
casting is reinterpreting data as a different type, conversion is modifying data into a different type
<unshadow>
this is better then 3 if's
<unshadow>
daemon_port = ((config["main_process"] as Hash)["port"] as String).to_i
<jhass>
I disagree, but oh well
<unshadow>
tbh both are ugly :(
<unshadow>
it feels like raping the language
<jhass>
write toml_mapping ;)
DerisiveLogic has joined #crystal-lang
<unshadow>
yeha.... can barly write a lib without half the crystal mailing list giving me a hand hahah
<unshadow>
btw, there is .is_a?() is there a .is_not?()
<BlaXpirit>
would be able to make the other one just as well if i knew where to pass flags
ponga has quit [Quit: Leaving...]
asterite has joined #crystal-lang
a^ is now known as orliesaurus
bcardiff has joined #crystal-lang
bcardiff1 has quit [Ping timeout: 265 seconds]
kulelu88 has joined #crystal-lang
zz_Cidan is now known as Cidan
<crystal-gh>
[crystal] asterite pushed 3 new commits to master: http://git.io/vkC8d
<crystal-gh>
crystal/master 69a73e1 Ary Borenszweig: Disallow more types in generics: Struct, Class, Proc, Tuple, Enum, StaticArray and Pointer. Fixes #701
<crystal-gh>
crystal/master c3edbbd Ary Borenszweig: Specify type of Dependency @name. Fixes #699
<crystal-gh>
crystal/master 6d0de91 Ary Borenszweig: The `method_missing` macro now also accepts just one argument, a call. The 3 arguments way will be deprecated and later removed.
<jhass>
if I had to guess, remove the inner .value and as LibGumbo::GumboNode*
<zamith>
in ./src/gumbocr.cr:192: can't cast Void to LibGumbo::GumboNode
<zamith>
p (node.v.element.children.data[0].value as LibGumbo::GumboNode).type
<jhass>
yup, that confirms my guess
<BlaXpirit>
will u finally try my 9 minute old suggestion
<zamith>
yup that works
<zamith>
BlaXpirit: was that what you meant?
<zamith>
I must have misunderstand you
<jhass>
Foo* is just pretty for Pointer(Foo)
<zamith>
yes, I know that one ;)
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
<crystal-gh>
[crystal] bcardiff pushed 1 new commit to master: http://git.io/vkWnI
<crystal-gh>
crystal/master 3f41f26 Brian J. Cardiff: Add HTML::Builder#doctype
bcardiff has quit [Quit: Leaving.]
asterite has joined #crystal-lang
<asterite>
!memo asterite hi
<DeBot>
asterite: You can't leave memos for yourself ...
<asterite>
Still working :-)
<asterite>
!memo wanderer_ is there a way I can contact you? It would be nice to merge and make work the windows branch, so you don't have to keep synchronizing... I'm sure it must be painful
<DeBot>
asterite: Added memo for wanderer_.
<jhass>
uh, it takes regex btw
<jhass>
!memo /aster.+/ useful to not match the tail
<DeBot>
jhass: Added memo for /aster.+/.
<asterite>
Awesome!
<strcmp1>
!memo /str.+/ hello
<DeBot>
strcmp1: Added memo for /str.+/.
<strcmp1>
cool
<sandelius>
asterite is there any roadmap on when Crystal will be "stable" enough? 6 month, this year, next year. I'm really looking forward to it, awesome job you all!
<asterite>
:)
<asterite>
sandelius: I don't know how to estimate that
<asterite>
We probably need to make a list of things we want for 1.0
<sandelius>
asterite well I understand that. If I ask you this then: What's your intentions with this project?
<asterite>
Well, given this is a general purpose programming language, that's a difficult question to answer
<asterite>
but I guess once we have something similar to Sinatra or Rails (but not that big) working, without bugs, we can consider we reached 1.0
<asterite>
or we achieved a big milestone
<asterite>
We have to continue Frank with @waj, but lately we didn't have much time
<asterite>
We always go back to Frank and find bugs and things to improve, and that keeps pushing the language forward
<asterite>
as well as other projects others are making, like jhass
<sandelius>
asterite well that sound just right up my alley, I'll start fiddling with a sinatra/express.js thingy wingy.
<asterite>
The intentions would be: a language that's fast for prototyping but ends up with efficient code, with out-of-the-box support for concurrency with coroutines and channels
<asterite>
but we started the last part just recently, so there's still a lot of things to do
<sandelius>
asterite if that happens, it's a dream come true
zamith has quit [Quit: Be back later ...]
asterite has quit [Quit: Page closed]
<travis-ci>
manastech/crystal#2382 (master - 3f41f26 : Brian J. Cardiff): The build passed.