These are chat archives for dpc/rhex

5th
Jul 2016
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 03:45 UTC
Did it work @jaredmanning ?
Gouda
@GoudaOnBeamPro
Jul 05 2016 04:54 UTC
Let me get back to you on that. I've been goofing off all day and just started reading Ch. 4.7 in The Book
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 04:54 UTC
Ah, reading the Rust book? Good read. Enjoy!
Gouda
@GoudaOnBeamPro
Jul 05 2016 04:56 UTC
I realllyyy am enjoying it. Luckily I have a bit of programming experience behind me. It's not much but enough to get me by (and make my jaw drop and actually fanboy every now and then when something wonderful about Rust makes the lightbulb in my head go off)
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 04:56 UTC
Yes, Rust is amazing.
Though it has it weaknesses too. :)
Gouda
@GoudaOnBeamPro
Jul 05 2016 04:57 UTC
and I'm sure I'll recognize them as I learn more languages.
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 04:57 UTC
You'll recognize them when you start writing software in Rust. ;D
My biggest pain is: it is much slower to get anything working in Rust, as there's no "not perfect, but working" stage in Rust. Everything has to be right, which is much harder to get than "it's working, and I'll improve it later".
Gouda
@GoudaOnBeamPro
Jul 05 2016 04:59 UTC
Just out of curiosity, if you happen to know, how do the strengths and weaknesses of Rust compare to those of Swift and Go. I'm wondering because from what I've seen, heard, and read, these are the new systems programming kinda languages. Any thoughts on that?
now that sounds like something I absolutely need haha! What exactly is it about Rust that makes it so?
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 04:59 UTC
I am working at dayjob using Go (and C++). In my free time I'm using Rust.
Go is very simple and productive.
It's so easy to get stuff done in Go ... and it's easy to read, and understand.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:01 UTC
ahhh
that sounds wonderful!
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:01 UTC
Eg. you have garbage collector, so you don't worry about much , just pass pointers around and things just work.
You have in built coroutines, so you can spawn new "threads" without working about anything.
The perforamnce is good enough.
The community sucks though. :D
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:02 UTC
oooh okay. I thought Go didn't have what was thought to be a GC like in Java or C++
awwww bad communities are no fun D:
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:03 UTC
Go has a GC and it's working OK.
Unless you need real-time performance, you probably don't have to worry about it.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:03 UTC
duly noted
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:04 UTC
And since people use slow languages like Ruby and Python, and are doing fine, Go is even better.
And maybe it was just me with the Go community.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:04 UTC
hahaha nice!
if there's one, there's some
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:04 UTC
I just happen to get in touch with subborn, dogmatic people on Go IRC.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:04 UTC
oooh I see
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:04 UTC
Rust community is the best programming community I have ever dealt with.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:04 UTC
I've been loooving the irc community for rust :D such nice people
absolutely
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:05 UTC
I have only theoretical knowledge about Swift.
Probably a bit better then Go.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:06 UTC
anything to whet my palate would be wonderful :D
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:06 UTC
(IMO)
Most probably more focused on system-level stuff, instead of network-level stuff.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:06 UTC
ahhh okay
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:07 UTC
Since poor Apple devs had to deal with this little nightmare called "objective C", they will switch to Swift... swiftly.
Swift does not have a GC (AFAIR), but used reference counting everywhere.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:07 UTC
as far as I've seen in trying to try out Swift, a lot of stuff looks to be focused on developing for the Apple products. Even on the git awesome list, the readings and tutorials are filled with it
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:07 UTC
I would be guessing that it's going to be very productive language too.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:07 UTC
that's great!
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:08 UTC
Yes, because Swift is badly needed in Apple ecosystems since Objective C sucks.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:08 UTC
in my headcanon, Rust, Go, and Swift are the top contenders to replace C in the next decade
hahaha
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:08 UTC
Rest of the programmers don't care much about Swift, I guess.
They have Go, and D which are similiar.
D used to be my favourite language that would replace C, but I've abandoned it.
They have some stuff that is simply unmatched: macro/template system, compilation speed.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:10 UTC
I saw a talk with devs from D, Go, Rust, and C++. D has C like syntax right?
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:10 UTC
But for a long time it was not full commuinity project, and was very Windows-centric IMO.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:10 UTC
ooooh
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:10 UTC
D is like better C++/Java.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:11 UTC
ahhhh
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:11 UTC
But it has a GC, which I don't like.
And ecosystem was never really working well, and was very Windowish.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:12 UTC
yuck D:
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:14 UTC
cargo is a masterpiece
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:14 UTC
I've really enjoyed it so far!
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:15 UTC
And it's kind of the symbol of Rust ... Anything Rust is just done right. The API is well-though, interfaces are amazing, software is done very properly etc.
It's not just "let's get this thing working and move on".
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:15 UTC
that's so great!! :D I'm glad I started with this one to really make my dive into programming
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:16 UTC
You don't know what you're getting into. :D
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:16 UTC
https://github.com/jaredmanning/learning If you're curious, this is the short extent of my programming abilities
https://github.com/jaredmanning/fizz_buzz and I did this the other day ^.^ I was kinda too proud of myself for such a silly little thing but it was my very first oneee
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:18 UTC
Well done. :D
Myself, I'm trying to learn Hoon, from Urbit.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:21 UTC
thank you! I was wondering if there is a way to make it so that I could throw and AND in there being divisible by three and five, since having to put the divisible by fifteen first bugged me a bit because it's needlessly evaluated in most cases (at least as far as I understand how match works. I'd love to be corrected)
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:22 UTC
Sure there is.
Most probably your current version would get optimized by the compiler anyway, but if you want to make sure I'd do something like that:
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:22 UTC
and then I thought that I might have to put it on the right side of the arm for either 5 or 3 but I didn't like the way it looked in my head
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:23 UTC
let divisiable_by_5 = n % 5 == 0;
let divisable_by_3 = n % 3 == 0;
match (divisable_by_3, divisable_by_5) {
 (true, true) => ...
 (true, false => ...
 (false, true) => ...
 (false, false) => ...
}
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:24 UTC
nice!!
that's awesome
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:24 UTC
Also, you can use Cow to eliminate repeating the println
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:26 UTC
I was thinking of doing something similar but then I thought that having the two variable bindings would make take up more memory, although of course it's probably such a small amount htat it doesn't matter, but it bugged me. Please tell me I'm incorrect
See now I saw that the other day and I just could not wrap my head around it at first. Now that I know a bit more Rust I'll go through it all. thanks!
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:27 UTC
number of variables is not correlated to amount of data used by program
Optimizer will optimize it away.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:30 UTC
awesome :D
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:31 UTC
If you're worrying about performance you should learn assembler. :)
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:31 UTC
hahaha
One possible career path that looks really interesting to me certainly involves that
RISC-V looks really promising
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:33 UTC
Press the ASM button.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:34 UTC
ooooh yes I've seen that stuff haha. It's toooo much for my little brain right now haha
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:35 UTC
Useful for comparing different versions of code etc.
RISC-V is nice, but very simplified.
IMO ARM Aseembly is very realistical, and quite easy to read and understand.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:36 UTC
I'm sure I'll learn this as I go along, since only about half of that makes since to me, but so far I've only seen str typed with the & in front of it, as in &str. What's the difference?
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:36 UTC
Intel ISA is years of cruft and ugliness. :D
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:36 UTC
hahaha
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:36 UTC
In practice there's no str.
It means "slice (view into) some text data.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:37 UTC
oooh slice! okay
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:37 UTC
It can only be passed as a reference (pointer + lenght) to existing data.
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:37 UTC
reference is a pointer + length. duly noted
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 05:39 UTC
Yeah. It will be in the book. :)
I got to go now. Enjoy the read!
Cu around
Gouda
@GoudaOnBeamPro
Jul 05 2016 05:40 UTC
thank you!!
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:32 UTC
I meant to say earlier that when I'm in tmux, I have TERM=screen-256color. Still didn't work for the game :(
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:34 UTC
putty-256color ?
Your terminal is putty, right?
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:35 UTC
right I have that going when I'm ssh'd in, but also when using tmux I tried doing screen-256color and that didn't work either
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:35 UTC
Hmmm ...
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:36 UTC
I'm gonna whip out my old laptop with PC-BSD on it and try it from there later
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:36 UTC
In case of putty and tmux, your putty needs to send TERM=putty-256color or you need to set it before you start tmux.
Then in tmux itself you need to set it to screen-256color.
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:37 UTC
yes that's what I've described :D
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:37 UTC
And it works?
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:37 UTC
nope
I'll figure it out eventually
oooh hang on
I have an idea
it'll take a moment though. I forgot about changing /etc/ttys to make all the virtual terminals xterm-256color. That probably won't affect a thing but I'm running out of ideas
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:45 UTC
yeah that was pointless haha
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:58 UTC
Well, I don't know then. Double check everything.
So you're saying it is working if you don't start tmux?
That would be progress.
Gouda
@GoudaOnBeamPro
Jul 05 2016 06:59 UTC
not working at all locally. Only works when I ssh into your demo server cx
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 06:59 UTC
It's not "local" if you ssh a to a freebsd box. :)
Gouda
@GoudaOnBeamPro
Jul 05 2016 07:00 UTC
wellllll
you got me haha
you know what I mean
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 07:00 UTC
So how did you deal with the lack of terminfo files or something like that?
Gouda
@GoudaOnBeamPro
Jul 05 2016 07:01 UTC
Not sure there is a lack of such or not
where would I find that?
lmao I google "freebsd terminfo" and it's all about ncurses
hmmmmmmm
Dawid Ciężarkiewicz
@dpc
Jul 05 2016 07:03 UTC
google "putty freebsd 256 color" or something like that ; i sent you a link yesteday about creating some files manually
Gouda
@GoudaOnBeamPro
Jul 05 2016 07:10 UTC
I did that already, but that's termcap
I think I need to do something with terminfo
Gouda
@GoudaOnBeamPro
Jul 05 2016 07:12 UTC
looks more like what I need. But it's horribly outdated, so I'll read the man pages and see what can be done in a similar way
thanks ^.^
Gouda
@GoudaOnBeamPro
Jul 05 2016 07:37 UTC
gonna sleep on it. I feel like I'm getting closer to fixing it haha
night y'all
thanks again for the help!