<FromGitter>
<Sevensidedmarble> Does anyone know how the return process::status from process.wait works? I don't quite get what the waitpid_future.get line means. Does that return the status of the process?
<FromGitter>
<Sevensidedmarble> My Confusion it seems like #wait blocks, so how can you know when the status of said process has changed?
<oprypin>
Sevensidedmarble, it blocks until the process has finished
<oprypin>
i dont understand what part is not clear
<FromGitter>
<Sevensidedmarble> What if you need to watch for changes to the processes status?
<oprypin>
Sevensidedmarble, there is no such thing. a process produces a status simultaneously with its termination
<FromGitter>
<Sevensidedmarble> I was under the impression that a process that's stopped via sigstop signal was still running, just paused.
<FromGitter>
<Sevensidedmarble> Does that count as terminated?
<oprypin>
no
<FromGitter>
<Sevensidedmarble> So what if you need to monitor another process for that?
<oprypin>
this tires me. what do you actually want to do?
<FromGitter>
<Sevensidedmarble> Well that's literally what I'm trying to do, I have a shell that spawns processes and waits for them to finish, but I need to be able to pause them with ctrl z like any other shell and resume them later. But I can't just block until they terminate, I need to know when they've paused.
<FromGitter>
<Sevensidedmarble> Sorry it's hard to phrase the question as I haven't dealt much with linux processes before
<hightower3>
Do signals work? I do Signal::USR2.trap {something}, but the program exits rather than execute block
<FromGitter>
<pnloyd> That's what I wanted to show @RX14
<oprypin>
i have no opinion
<FromGitter>
<pnloyd> It would cool if Crystal got a performance boost like that for free.
snsei has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter>
<Rinkana> It does look interesting. But there have to be some drawbacks with it.
<FromGitter>
<pnloyd> That's what I was thinking, hopefully someone knowledgeable on the subject in the Crystal team looks at it.
<FromGitter>
<Qwerp-Derp> I have an executable `foo` in Mac OS X, and I have a bunch of `.dylib` files which `foo` dynamically links to in the folder `dylib`. How do I statically link those dynamic libraries?
<FromGitter>
<iambudi> Hi...
<FromGitter>
<iambudi> what’s new in amber now? kind of busy these two days...
<FromGitter>
<iambudi> Ups wrong room
<FromGitter>
<iambudi> 🙏
<FromGitter>
<crisward> Wrong mineral?
<FromGitter>
<iambudi> Haha yes
Ven has joined #crystal-lang
Ven is now known as Guest25031
Guest25031 has quit [Ping timeout: 240 seconds]
<FromGitter>
<petoem> good morning
claudiuinberlin has joined #crystal-lang
snsei has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
<FromGitter>
<r3bo0t> Does `HTTP::Client` allow to choose/set http versions 1.1/1.0/0.9 in case the requested webserver doesn’t support 1.1
<crystal-gh>
[crystal] j8r closed pull request #5230: FileUtils: Add a recursive `chmod_r` and `chown_r` (master...recursive_chmod_chown) https://git.io/vF3go
<FromGitter>
<bararchy> @montychen you better ask Kemal relates questions in the Kemal room :)
<FromGitter>
<bararchy> @sdogruyol and @crisward would be more then happy to help you :)
<FromGitter>
<crisward> @montychen Use that last release of kemal, not master, unless you're using the pre-release version of crystal
<FromGitter>
<crisward> @sdogruyol I'll happily do a pull request with that macro if you change your mind about this issue.
<FromGitter>
<sdogruyol> I don't understand why would anyone uses Kemal master
<Papierkorb_>
latest+greatest
ShalokShalom has joined #crystal-lang
<FromGitter>
<crisward> There are some bug fixes which make it necessary for me at the moment.
<FromGitter>
<crisward> Also, internally we try and keep master 'deployable'. New features in branch, merge when passing. Fixes straight onto master. I suppose it depends what you're used to and how far apart the releases are.
<FromGitter>
<montychen> thanks. I see.
<FromGitter>
<bararchy> @sdogruyol I'm using master :) because I'm running 0.24
ShalokShalom_ has joined #crystal-lang
<vegai>
does crystal need the === -operator, I wonder
<vegai>
I guess I've wondered this before
ShalokShalom has quit [Ping timeout: 268 seconds]
<vegai>
so I'll answer it myself, why not :P === is "case equality", defined in Object
<vegai>
there's something I don't get about this yet, though
<vegai>
the Book says "For example, Class defines case equality as when an object is an instance of that class"
<vegai>
shouldn't that mean that a="1"; a===String => True?
<vegai>
but it's not
<vegai>
oh dear
<vegai>
a="1"; String===a *is* true
<vegai>
it's not commutative. Is that bad?
<Yxhuvud>
It is quite expected. At least if crystal follow the lead of ruby, === is used in case statements, meaning you can put in classes or regexps or whatever in there.
<vegai>
would it hurt if this was mentioned in the Book?
<FromGitter>
<crisward> @bararchy how is 0.24, much work to update?
<FromGitter>
<bararchy> Nope, just a single line (open/new)
<FromGitter>
<bararchy> For the tar handler
<FromGitter>
<crisward> Nothing to change in your own code?
<Yxhuvud>
vegai: it is clear that it isn't commutative from reading that page. perhaps not explicitly stated, but very obvious from the examples.
<FromGitter>
<Rinkana> What is the Crystal version of `uint64_t`? Just `UInt64`
<FromGitter>
<bew> Yes
<Papierkorb_>
vegai: It should be mentioned that using === on your own is usually a bad idea
<Yxhuvud>
it is more that it is almost always a more readable way to get what you want.
<FromGitter>
<bararchy> @crisward only SecureRandom
Ven has joined #crystal-lang
binBASH has joined #crystal-lang
Ven is now known as Guest32862
<FromGitter>
<crisward> Looking through the changelog, I've hit almost all of them, and some dependencies need updating too. Think I'll wait for the full release then make changes then. Nice thing with crystal, at least the compiler will tell me if I miss any.
Guest32862 has quit [Ping timeout: 250 seconds]
<FromGitter>
<bararchy> That's true :)
<FromGitter>
<pnloyd> @Papierkorb , do you think the immix GC is possible?
<FromGitter>
<pnloyd> Err viable rather than possible.
<FromGitter>
<sdogruyol> what's that?
<Papierkorb_>
Depends on what it actually is
<Papierkorb_>
don't have the time to watch the whole talk, nor read their source
<Papierkorb_>
In any case, it'd probably require complex changes to the compiler
<Papierkorb_>
If that'd make the compiler and stdlib provide a more agnostic GC interface to hook into, that'd be great
<FromGitter>
<pnloyd> @Papierkorb , I'm super curious. @ysbaddaden identified a possible block.
<Papierkorb_>
And it won't work "plug and play" at all
<Papierkorb_>
Boehm is purely conservative, which is great. You just use boehms allocation function instead of pure malloc(). That's it.
<FromGitter>
<pnloyd> Ya see that's where my extremely naive knowledge is embarrassing me there..
<Papierkorb_>
Immix seems to be precise, hence it'd require type information, making this not possible anymore.
<FromGitter>
<sdogruyol> considering that it's coming from a JVM background...plug and play sounds too good to be true
<FromGitter>
<pnloyd> No
<FromGitter>
<pnloyd> It's not JVM
<Papierkorb_>
Maybe I'll look at it this week-end
<FromGitter>
<sdogruyol> isn't this bundled with Scala?
<FromGitter>
<pnloyd> Scalla native has nothing to do with the JVM
<FromGitter>
<sdogruyol> I meant the mindset of those languages anyway :P
<Papierkorb_>
I may already know where to hook into to get that type information for an experimental awful GC I wrote
<FromGitter>
<crisward> Sounds like a nice weekend project.
<Papierkorb_>
pnloyd > @Papierkorb, also I think intuition would tell you that if (i assume so) scal-native can seamlessly switch between boehm and immix, Crystal would be able to as well.
<Papierkorb_>
That doesn't mean it at all
<FromGitter>
<pnloyd> They re-implement the parts of the Java stdlib the scala stdlib needed.
<Papierkorb_>
crisward, but then, I planned other things to do
<FromGitter>
<pnloyd> @Papierkorb, I know it's a lot more complicated than that.
<FromGitter>
<crisward> I've got an Irish wedding to go to... don't think I'll be capable of programming after, for a while...
<FromGitter>
<sdogruyol> lol
<FromGitter>
<sdogruyol> @crisward have fun :)
<FromGitter>
<pnloyd> @Papierkorb , I was just trying to push the idea that it might be possible and the performance gains are too dramatic to be overlooked.
<Papierkorb_>
In *their* benchmarks
<Papierkorb_>
Are they applicable to Crystal?
<Papierkorb_>
No one can tell until trying it in Crystal
<FromGitter>
<pnloyd> Are a big part of my point is that it might not be hard to try..
<Papierkorb_>
Which is where you may be totally off
<FromGitter>
<pnloyd> I agree.
<FromGitter>
<sdogruyol> @pnloyd thanks for the issue 👍
<FromGitter>
<pnloyd> @sdogruyol, hopefully it can be a win for Crystal, :-/
<Papierkorb_>
I'm confused, is boehm an actual problem for you right now?
<Papierkorb_>
The real elephant is threading support (and then Windows support probably). Multi-threading is where we'll see GCs simply break
<FromGitter>
<pnloyd> Ya I have a program that is making lot's of small memory allocations but.. It's not like the GC it biased for my case.
<FromGitter>
<pnloyd> @Papierkorb, I think I really interesting thing to consider is the scala-native is fighting almost identical issues to Crystal. (windows support, threading, and others)
<Papierkorb_>
As has Rust
<FromGitter>
<pnloyd> After spending a lot of time looking at both projects I was honestly amazed at the number of parallels I was able to draw.
<Yxhuvud>
pnloyd: you need something more generational than boehm?
<Yxhuvud>
what algorithm does immix use?
<Papierkorb_>
immix is immix
<vegai>
Yxhuvud, Papierkorb_: ok
<FromGitter>
<pnloyd> I don't know anything about GC's
<Papierkorb_>
If that is the case, it's most likely not possible to be used
<vegai>
I mean sure, if it's possible to implement parallelism without breaking simplicity and the language, there's no reason not to do it
<Papierkorb_>
.. And everything that's highly concurrent
<Yxhuvud>
pnloyd: because fortran is already occupieing that space. Except that it does concurrency too.
<Papierkorb_>
pnloyd, because that's easier said than done
<FromGitter>
<pnloyd> @Papierkorb, how sure are you? If your very sure then I should close the issue so any Crystal devs time isn't wasted looking at it.
<Yxhuvud>
Papierkorb_: Is there more than support for C extensions that make you don't think compaction is feasible?
<Yxhuvud>
*is not
<Papierkorb_>
`a = Bytes.new(20); b = a[5..10]`
<Papierkorb_>
pnloyd, you'd have to read the paper to know for sure.
<FromGitter>
<pnloyd> @Papierkorb , I'll trust you ;-)
mbarbar has joined #crystal-lang
<Papierkorb_>
But I wouldn't, cause I simply flew over the linked slideshow
<Papierkorb_>
wrt Compaction, is there a recent study showing if it's actually beneficial nowadays?
<Papierkorb_>
Outside of microbenchmarks tuned to showcase that holes happen?
<Yxhuvud>
Isn't the alternative eventual death by fragmentation?
<Papierkorb_>
Eventual?
<Papierkorb_>
Yeah if you exhaust the 2^48-ish virtual memory space of modern x64 machines
<Papierkorb_>
and never can find a hole to fit your data in, which is unlikely
notdaniel has joined #crystal-lang
flaviodesousa has joined #crystal-lang
<FromGitter>
<r3bo0t> @petoem thanks I will try the same.
<FromGitter>
<5minpause> Hi. Is anybody here?
Ven has joined #crystal-lang
Ven is now known as Guest3192
<FromGitter>
<5minpause> I have a question and I cannot find the answer. Was hoping you could help me. ⏎ ⏎ 1) I created a new module that I want to use as a type for arguments for my method. ⏎ 2) I allowed the type for the method. ⏎ 3) I want to have Int32 and Int64 "behave" as this type as well. So I wouldn't have to allow Int32 as type by itself, but still be allowed to use it as a method argument. ...
<FromGitter>
<5minpause> Sorry I am new to crystal. Thanks for your response. That would mean that I specify several types for the method argument, right? Could I just extend existing types with my new type? so I would only need to allow my new type and have the rest implicitly?
alex`` has quit [Quit: WeeChat 1.9.1]
<FromGitter>
<fridgerator> I'm not exactly sure what you mean, but you can create your own new type `alias MyNewType = Int32 | Int64 | SomeOtherType`
vivus has joined #crystal-lang
<RX14>
@5minpause do you mean a type that behaves like `Int32` but isn't compatible? Like newtype in haskell? We don't have that i'm afraid
<FromGitter>
<5minpause> Alright, so my method looks like this (hope I get the syntax highlighting right): ⏎ `def foo (content : String | MyNewModuleAsAType)`
<FromGitter>
<5minpause> No I image doing `struct Int32; include MyNewModuleAsAType; end`
<FromGitter>
<5minpause> and then use `foo(3)`
<FromGitter>
<5minpause> or include my module somewhere else and by able to use that as an argument to `foo`
<FromGitter>
<5minpause> does that make sense?
<FromGitter>
<5minpause> imagine I write a library and want users to be able to have their own types include my module, so their types can be passed to `foo` as well
<RX14>
why not just not specify a type
<RX14>
why do you need to patch Int32?
<RX14>
what's the actual usecase here?
<FromGitter>
<5minpause> Because I cannot foresee what types will be passed to the method
<RX14>
so don't specify a type restriction
<RX14>
it's as easy as that
<FromGitter>
<5minpause> you are right, that is a possible answer. thank you
hightower2 has joined #crystal-lang
alex`` has quit [Ping timeout: 258 seconds]
<FromGitter>
<pnloyd> @RX14, are you going to keep comicating
<RX14>
??
<FromGitter>
<pnloyd> Gitter.. :-/.. ⏎ Are you going to keep communicating with the scala dev? I apologize I'm just super interested in the performance gains.
<RX14>
well i said I'm not really interested on working on it
<FromGitter>
<pnloyd> I'm really hopeing he stay's interested in opening up their GC.
<FromGitter>
<pnloyd> Gitter..
<FromGitter>
<pnloyd> Well you don't have to work on it, just show him that Crystal is interested.
<FromGitter>
<pnloyd> Or tell him, however.
<RX14>
i said, i'll gladly accepr PRs
<RX14>
and maybe after 1.0 it will become a priority to work on
<FromGitter>
<pnloyd> That does not does very interested.
<FromGitter>
<pnloyd> Did you look at those benchmarks!?!
<RX14>
yes
<FromGitter>
<pnloyd> It opens up so many use cases
<RX14>
and its cool
<RX14>
no it doesn't
<FromGitter>
<pnloyd> Well at least a handful..
<FromGitter>
<pnloyd> It doesn't take much work to show interest.
<RX14>
windows will open many more
<RX14>
and parallelism will open many more
<RX14>
they're much more important
<RX14>
i'd rather spend my time on them if I had time
<FromGitter>
<pnloyd> Ya parallelism is bigger, but this is an easy win. That guy is a PhD student being pad full time to do the work his does. Showing him does some appreciation that results in him taking interest in the project would result in more "wins" per effort on implementing parallelisms.
<FromGitter>
<pnloyd> You can say "thanks bro for making our GC 300% better" 10000x faster than you can implement any of those other items.
<FromGitter>
<Sevensidedmarble> the compiler found that type
<crystal-gh>
[crystal] bcardiff pushed 1 new commit to master: https://git.io/vFav1
<crystal-gh>
crystal/master 4b6f1c1 Joakim Reinert: Add custom extension support for Tempfile (#5264)
<FromGitter>
<Sevensidedmarble> any chance of a setpgid api being exposed?
<FromGitter>
<Sevensidedmarble> theres a method to get it right from crystal but not to set it
<FromGitter>
<Sevensidedmarble> I could write a pull request
mbarbar has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
<FromGitter>
<maiha> @codem4ster Compiled successfully in ubuntu-16.04 without any other arguments like `-lyajl`.
snsei has quit [Remote host closed the connection]
<FromGitter>
<maiha> I guess you've install `libyajl-dev` package too, and `-lyajl` causes confliction. I just installed `mongo-c-driver-1.1.0`, and run `ldconfig`, then `shards update` works well.
snsei has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
faustinoaq has quit [Quit: Konversation terminated!]
faustinoaq has joined #crystal-lang
Papierkorb_ has quit [Quit: Konversation terminated!]
<FromGitter>
<unreadable> I'm using 0.23.1, go with that
DTZUZO has quit [Ping timeout: 260 seconds]
<FromGitter>
<unreadable> haven't switch to 24
<FromGitter>
<EdoardoLaGreca_twitter> I think I'm using the last version
<oprypin>
ylluminate, are u being serious right now
<FromGitter>
<EdoardoLaGreca_twitter> I'm waiting for a response
<Papierkorb>
lol
<oprypin>
EdoardoLaGreca_twitter, i mean you can scroll up by 20 hours and see our conclusion "uninstall solus"
<Papierkorb>
and some minutes before that a different solution
<FromGitter>
<EdoardoLaGreca_twitter> what if I wanna keep solus as my os?
<FromGitter>
<unreadable> no man, don't uninstall it. Go against the water
<FromGitter>
<EdoardoLaGreca_twitter> very helpful -_-
<FromGitter>
<unreadable> > **<oprypin>** EdoardoLaGreca_twitter, i mean you can scroll up by 20 hours and see our conclusion "uninstall solus" wth, uninstall an operating system just because he couldn't install a compiler?
<FromGitter>
<unreadable> rip quote
<FromGitter>
<unreadable> tl;dr: It's not worth it to uninstall the whole os just because the compiler is not working
<FromGitter>
<EdoardoLaGreca_twitter> I know
<FromGitter>
<unreadable> clone the .23.1 repo and follow the steps
<oprypin>
just because the system, for no reason but incompetence, changes a parameter that is the same on every other Linux distro, thus breaking things
<Papierkorb>
lul there was a solution posted yesterday already
<Papierkorb>
finding it left as excercise to the reader
<FromGitter>
<unreadable> the windows api for gui programming is not bad at all
<FromGitter>
<unreadable> wondering if linux has something like this
<oprypin>
both windows and Linux API are atrocious
<oprypin>
Linux also fragmented now
<Papierkorb>
linux api for gui..?
<FromGitter>
<EdoardoLaGreca_twitter> there is GTK
<oprypin>
that would be x11 in my view
<FromGitter>
<EdoardoLaGreca_twitter> or wxWidgets
<Papierkorb>
unreadable, um there's no native gui toolkit or even API on linux
<FromGitter>
<EdoardoLaGreca_twitter> > **<oprypin>** just because the system, for no reason but incompetence, changes a parameter that is the same on every other Linux distro, thus breaking things
<FromGitter>
<EdoardoLaGreca_twitter> how can I change this parameter?
<Papierkorb>
sometimes I think I'm on the blocklist of many
<oprypin>
recompiling gcc probably
<FromGitter>
<unreadable> Fk it, I'ma start writting a sdl2 based gui lib..
<oprypin>
Papierkorb, you out of all people? no way
<oprypin>
or you mean that it feels that way
<Papierkorb>
you're not on mine either
<Papierkorb>
Of course it feels like it, even it was the case (I'd guess that most don't even know how to or don't bother?), I'd never know.
wontruefree has joined #crystal-lang
<FromGitter>
<EdoardoLaGreca_twitter> I think I'll go to stack exchange and ask for a solution to my problem
<FromGitter>
<sdogruyol> Compiling gcc takes more than an hour on an i7
<FromGitter>
<sdogruyol> Feels like eternity
<faustinoaq>
@unreadable I don't get it, Two persons are having problems installing crystal on solus, but you compiled crystal on solus successfully, Why Are they doing wrong?
<faustinoaq>
s/Why/What/
<FromGitter>
<unreadable> Idk, let's just end this. It's becoming annoying
<oprypin>
i mean you cant just end it, we still have 2 people hanging
<FromGitter>
<EdoardoLaGreca_twitter> we just need to know HOW did it install it
<FromGitter>
<unreadable> I've just followed the steps..I can't remember exactly if I did some changes since it's been some time
<Papierkorb>
Are the OS versions equal? Is some important packet simply toast for those affected? (Maybe clang or llvm)
<Papierkorb>
And/or were any related packages (like clang or llvm) installed from source (or somewhere else), or did everyone install it from the solus repository
<oprypin>
dont forget gcc^
<oprypin>
in fact, from what i've seen so far, the easiest and most useful thing for @unreadable to do is to post the output of `gcc -v`
<FromGitter>
<EdoardoLaGreca_twitter> I installed llvm and clang from eopkg
<FromGitter>
<watzon> I feel like I've seen this issue before where everything builds, but prelude fails to load
<FromGitter>
<watzon> What lib is `c/dlfcn`?
<oprypin>
c
<oprypin>
what happens is that the OS is not detected as "linux" but as "solus" because it's a unique snowflake
<Papierkorb>
that gcc version is much more recent than what edo posted
<oprypin>
watzon, i am looking for the equivalent from @unreadable
<FromGitter>
<watzon> Oh that's true
<FromGitter>
<unreadable> I've installed crystal some time ago and I can't guarantee I've done it on gcc 7.1.0
qard has joined #crystal-lang
<FromGitter>
<watzon> I will go above and beyond here. Let me get a Solus install up and running so I can do some testing
A124 has quit [Ping timeout: 258 seconds]
A124 has joined #crystal-lang
<FromGitter>
<watzon> I've got to say, the Solus install process is very simple
A124 has quit [Ping timeout: 248 seconds]
<oprypin>
aand he was never seen since
<FromGitter>
<watzon> Lol
<hightower3>
Oh man remind me, what's the keyword for read-only property
wontruefree has quit [Ping timeout: 258 seconds]
<RX14>
getrer ?
<RX14>
getter*
<RX14>
there's getter/setter/property
<hightower3>
ah god, yeah, was trying with 'reader'
<RX14>
clearly you came from ruby haha
<FromGitter>
<marksiemers> Can crystal bind to C++ the way it can do C bindings?
<Papierkorb>
you mean with a simple `lib` binding? Not in the general case, no
<RX14>
C++ mangles identifier names and it's not standardized at all how the mangling is done
<RX14>
so it's basically impractical to implement it in lib
<RX14>
you have to write a small wrapper in C++ that exports it in c, and Papierkorb has written a project to do ecactly that automagically
<FromGitter>
<marksiemers> on GH?
<Papierkorb>
[* with an appropriate, user-written configuration file]
<FromGitter>
<marksiemers> I had a thought that binding to ulib's postgres functions might be a way to get a fast db driver.
<FromGitter>
<marksiemers> Does that sound like a fool's errand?
<Papierkorb>
Actually it does
<Papierkorb>
What you actually want is that the DB driver to be integrated with libevent
<Papierkorb>
You get this for free if you implement it in Crystal
<Papierkorb>
Some (rare?) C library may also offer integration, so that's also an option
<FromGitter>
<sdogruyol> pg is already written in crystal?
<Papierkorb>
And that too.
<FromGitter>
<marksiemers> There is `crystal-pg` of course and `crystal-db` - but they benchmark relatively low on the TFB tests. If it was (sort of) easy to experiment with ulib (which benchmarks in the 97th percentile), I thought it might be worth a shot
<Papierkorb>
What you actually want is a libevent native implementation, so that it won't block the thread and just a fiber
<FromGitter>
<marksiemers> Is that something that would be baked into the db driver(s) or should it be done in each app using them?
<FromGitter>
<sdogruyol> I'm pretty sure crystal-db and pg has some low hanging fruits to optimize
<Papierkorb>
I mean you can try, just that even if it's really fast, it's not that useful in the general case
<FromGitter>
<sdogruyol> we need more to contribute to those
<Papierkorb>
^
<Papierkorb>
Maybe you can scavenge some ideas from that ulib though
<FromGitter>
<sdogruyol> @marksiemers it's great to see your interest in performance, may I ask what's your specific use case?
<RX14>
@marksiemers have you benchmarked crystal-pg directly?
<RX14>
if not, do that *first* before even attempting optimization
<RX14>
bench it against go and a C pg driver or whatever you want
DTZUZO has joined #crystal-lang
<FromGitter>
<marksiemers> @sdogruyol - I plan to evangelize crystal (and amber). For any developer or company doing web or api apps, if they are going to make the switch - they are going to care about db performance and published db performance at that (over plaintext).
<FromGitter>
<sdogruyol> that's great to hear
<FromGitter>
<sdogruyol> I've been evangelizing Crystal for more than 2 years now. It's great to see more interested in doing so
<FromGitter>
<marksiemers> RX - that's a good point, I have not. I'm just assuming since plaintext and JSON serialization are relatively fast with crystal-raw, that HTTP::Server is not the bottleneck in the TFB tests - then crystal-db and crystal-pg seemed the next logical place.
<RX14>
don't assume
<RX14>
benchmark
<FromGitter>
<marksiemers> Agreed, I guess that means setting up ulib locally to get an apples-to-apples comparison
<RX14>
or just something simple like go's pg driver
<RX14>
bench apples to apples
<FromGitter>
<sdogruyol> An easier might be just starting out with go, or node
<RX14>
if we're 3x slower than go you don't need to bench ulib
<FromGitter>
<sdogruyol> or maybe rust
faustinoaq has quit [Quit: Konversation terminated!]
<RX14>
you know we suck
<FromGitter>
<marksiemers> @sdogruyol - Yeah other than exercism, kemal was definitely the first way I used crystal.
<FromGitter>
<sdogruyol> glad to hear that
<FromGitter>
<marksiemers> Yeah, with the idea of binding to Ulib out the window, benching against those others makes more sense
<FromGitter>
<marksiemers> I just feel dirty writing in Go
faustinoaq has joined #crystal-lang
<RX14>
i've never written go
<FromGitter>
<sdogruyol> I haven't written any production stuff but read lots of go code
<RX14>
well you can read go without trying
<FromGitter>
<sdogruyol> %30 of them being if err != nil
<RX14>
it's just obvious
<FromGitter>
<sdogruyol> no
<RX14>
like C and most of C++
<FromGitter>
<sdogruyol> I don't agree with that
<FromGitter>
<sdogruyol> C is easier to read
<RX14>
not sure about that
<RX14>
try reading an unnamed function pointer definition or any complex type definition in C
<FromGitter>
<Sevensidedmarble> I think go is much messier looking then c
<RX14>
stuff like **foo()[5]()
<RX14>
what the fuck does that mean, it's probably valid C
<FromGitter>
<sdogruyol> I'm happy with Crystal
<FromGitter>
<sdogruyol> let's make it mainstream already :)
<RX14>
i think go looks about the same as C
<FromGitter>
<Sevensidedmarble> is there much documentation on the whole LibC thing?
<FromGitter>
<marksiemers> Given when it was developed (after ruby, python, and others), it seems Go was written by syntax masochists
<FromGitter>
<sdogruyol> we just need to make generics work better hehe
<FromGitter>
<Sevensidedmarble> it doesnt mention LibC in much detail
<RX14>
@sdogruyol you seem to never have anything bad to say about crystal lol
<FromGitter>
<Sevensidedmarble> crystal is beautiful though yes
<FromGitter>
<sdogruyol> I actually say a lot of negative stuff too :P (not here though)
<RX14>
i just moan about crystal here lol
<FromGitter>
<sdogruyol> but hey, let's keep those for later and focus on the good parts first
<FromGitter>
<marksiemers> With a lot of languages, coming from ruby, you trade off ease of development and syntax for performance. ⏎ I actually like crystal MORE than ruby - method overloading and the compiler stops me from being dumb quite a bit
<Papierkorb>
RX14: (͡° ͜ʖ ͡°)
<RX14>
no, you focus on the worst parts now because that's optimal for reducing the badness of crystal before 1.0
<RX14>
Papierkorb, shh
<FromGitter>
<sdogruyol> @RX14 ah yeah, the core team focuses on the worst first :P
<RX14>
i love crystal way more than ruby, it's ruby without the bad bits
<RX14>
i've pretty much always used statically typed languages
<Papierkorb>
basically ^
<FromGitter>
<marksiemers> Except that `Hash#key?` method. lol.
<RX14>
i mean it makes sense
<RX14>
hash.key(value)
<FromGitter>
<sdogruyol> Crystal is Ruby with a correct "English grammar"
<RX14>
then you need a nil-returning version
<FromGitter>
<sdogruyol> I still go back to Ruby and confuse "exist?" lol
<FromGitter>
<sdogruyol> @RX14 you didn't come from Ruby background?
<FromGitter>
<Rinkana> I was reading back and saw something about libevent. What is the best way to utilize that in my crystal app? It is already event based by having a few fibers read and write to the same deque.
<Papierkorb>
Rinkana, I/O goes through it by default, you don't have to do anything to benefit from it
<RX14>
@sdogruyol not at all
<RX14>
i've not written much ruby at all
<RX14>
i've written much more java than ruby
<RX14>
maybe even more groovy than ruby
<RX14>
lol
<RX14>
i've also never used rails
<Papierkorb>
matz, our lord and favorite japanese programmer
<Papierkorb>
ah you didn't miss much *runs*
<RX14>
yeah lol
<RX14>
rails was really the first big web framework
<RX14>
and with no previous work it's bound to be shit
<FromGitter>
<Rinkana> And yet, most that follow still suck more
<RX14>
we all stand on the shoulders of giants
<RX14>
rails is one of them but it has it's fair share of mistakes
<RX14>
like all of activerecord
<RX14>
and all of activesupport
<Papierkorb>
AR is shit, Sequel is the shit
<Papierkorb>
Roda too <3
<Papierkorb>
RX14: Well the most interesting parts of active support are part of the stdlib lul
<FromGitter>
<watzon> Ok I give up
<FromGitter>
<watzon> Solus in not working well in Vitrualbox or gnome-boxes
<FromGitter>
<watzon> FTS
<RX14>
Papierkorb, yeah in crystal
<FromGitter>
<Rinkana> That's the worst thing, you always wonder if the function is nave ruby or rails.
<Papierkorb>
Well that's the fault of the programmer really
<Papierkorb>
With pry it's trivial to look that up
<Papierkorb>
if you're not sure and too lazy to check the docs (All rails docs websites suck), or simply fire up a pry/irb and try it in there
<Papierkorb>
-or
<FromGitter>
<Rinkana> Too bad it's impossible for crystal to have a binding.pry equivalent. Thats one of the better features of an interpreted language.
<RX14>
i have a feeling that perhaps a crystal interpreter would work
<RX14>
but thats a massive and impressive undertaking
<FromGitter>
<marksiemers> Yeah, like Ch for C and C++
<Papierkorb>
RX14: not required
<Papierkorb>
(ab)use debugging data to locate locals, then patch user code into the program and run
<RX14>
what about complete hot reload?
<Papierkorb>
loses the state, nah
<Papierkorb>
Also you can't be sure the code under you will have the same address after the fact
<FromGitter>
<drosehn> Many years ago I worked on a platform which had "Interactive Fortran". Very nice interactive and editing capabilities. Given that I've seen that done for Fortran, the same thing could be done for any compiled language. However, the environment is different enough that you'd basically have to write the entire thing from scratch. It's a massive amount of work. InteractiveFortran shared no code with the
<FromGitter>
... fortran compilers available for the same platform.
<FromGitter>
<drosehn> Well, "environment" isn't the right idea. "requirements for an interactive version" would be better.
<faustinoaq>
Hey latest JavaScipt isn't bad, in fact TypeScript & JavaScript are doing very good :)
p0p0pr37 has quit [Remote host closed the connection]
<Papierkorb>
-not
p0p0pr37 has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter>
<EdoardoLaGreca_twitter> > Solus in not working well in Vitrualbox or gnome-boxes
<FromGitter>
<EdoardoLaGreca_twitter> and so I will remain without crystal?
<faustinoaq>
@EdoardoLaGreca_twitter please try to install crystal in other distro and see if your installation issue disappear, just for a while :)
<FromGitter>
<faultyserver> I've been thinking recently about how something like ICR could be implemented better, kinda getting at the "interpreted crystal" idea
<FromGitter>
<faultyserver> the main thing I think that needs is incremental compilation
wontruefree has joined #crystal-lang
<FromGitter>
<faultyserver> haven't put too much thought into what it would actually take, or how that would look
<FromGitter>
<faultyserver> but incremental compilation could help avoid the current "memorize the old output, then subtract it from the new output" thing
<FromGitter>
<faultyserver> it'd be a fun problem to waste a month on :)
wontruefree has quit [Ping timeout: 240 seconds]
<faustinoaq>
:)
faustinoaq has quit [Quit: Konversation terminated!]
snsei has joined #crystal-lang
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
snsei has quit [Remote host closed the connection]