<< 23-12-2017 >>

00:16:15radagastWithing a type, how do you declare a member to be mutable/immutable?
00:29:42FromGitter<Quelklef> I doubt you can
00:29:49FromGitter<Quelklef> since that's defined by the type of the member
00:29:57FromGitter<Quelklef> and its exposed procs
00:31:52*happycoder joined #nim
00:32:28FromGitter<Quelklef> you could emulate it by not exposing the member but making a getter with the same name which returns an immutable proxy object, i guess
00:49:57*cspar joined #nim
01:22:36*natrys quit (Quit: natrys)
01:39:27*cspar quit (Ping timeout: 240 seconds)
01:46:08*cspar joined #nim
01:59:14*yglukhov quit (Remote host closed the connection)
01:59:29*happycoder quit (Ping timeout: 248 seconds)
02:13:29*rauss quit (Quit: WeeChat 2.0)
02:14:51*rauss joined #nim
02:21:59*happycoder joined #nim
02:26:45*happycoder quit (Ping timeout: 268 seconds)
03:02:00*chemist69 quit (Ping timeout: 272 seconds)
03:15:09*chemist69 joined #nim
03:20:23*happycoder joined #nim
03:22:09*radagast quit (Read error: Connection reset by peer)
03:22:17*radagast joined #nim
03:35:05*happycoder2 joined #nim
03:37:05*happycoder quit (Ping timeout: 240 seconds)
03:37:53*vlad1777d_ quit (Ping timeout: 252 seconds)
03:59:49*yglukhov joined #nim
04:03:57*yglukhov quit (Ping timeout: 240 seconds)
04:06:55*happycoder2 quit (Ping timeout: 248 seconds)
04:29:10*endragor joined #nim
04:31:29*radagast quit (Quit: radagast)
04:40:02*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:40:46*dddddd quit (Remote host closed the connection)
04:52:55*happycoder joined #nim
04:57:05*happycoder quit (Ping timeout: 248 seconds)
05:22:01*happycoder joined #nim
05:29:34*happycoder quit (Ping timeout: 272 seconds)
05:48:53*SenasOzys joined #nim
06:17:01FromGitter<mratsim> @radagast, there is no deep immutability.
06:18:08*sz0 joined #nim
06:18:55FromGitter<mratsim> Maybe later once with write tracking: https://nim-lang.org/araq/writetracking.html
06:22:35*endragor quit (Remote host closed the connection)
06:23:04*endragor joined #nim
06:43:01*happycoder joined #nim
06:47:51FromGitter<tekjar> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
06:48:18FromGitter<tekjar> Hi. Is there a less verbose way to tag enums with data?
06:56:05*nc-x joined #nim
06:57:17*nsf joined #nim
06:58:27nc-x@tekjar https://github.com/andreaferretti/patty#constructing-variant-objects
06:58:38*happycoder quit (Ping timeout: 252 seconds)
07:08:30*nc-x quit (Quit: Page closed)
07:09:09FromGitter<tekjar> nc-x: Looks cool. Except for naming and visibility restrictions :). Are there any plans to add such variants directly to the language?
07:25:38*happycoder joined #nim
07:40:47*happycoder quit (Ping timeout: 248 seconds)
07:46:55*happycoder joined #nim
07:51:29*happycoder quit (Ping timeout: 248 seconds)
07:54:40FromGitter<mratsim> There is a feature request on the tracker iirc. To allow fields of the same name (which isn't allowed in C I think).
08:08:25*yglukhov joined #nim
08:12:59*yglukhov quit (Ping timeout: 256 seconds)
08:18:36*happycoder joined #nim
08:24:39*sz0 quit (Quit: Connection closed for inactivity)
08:25:59*solitudesf joined #nim
08:39:57*happycoder quit (Ping timeout: 264 seconds)
08:42:59*jjido joined #nim
08:46:55*happycoder joined #nim
08:48:37*happycoder quit (Read error: Connection reset by peer)
08:49:12*happycoder joined #nim
08:51:14*happycoder quit (Read error: Connection reset by peer)
08:51:22*happycoder2 joined #nim
08:57:39*happycoder joined #nim
08:58:31*happycoder2 quit (Ping timeout: 260 seconds)
09:02:58*sz0 joined #nim
09:03:17*gmpreussner quit (Ping timeout: 265 seconds)
09:05:16*gmpreussner joined #nim
09:06:17*radagast joined #nim
09:27:50FromGitter<mratsim> Wohohoho Arraymancer reached 100 stars, thanks for the support ✨
09:37:13*BitPuffin|osx joined #nim
09:42:21*happycoder2 joined #nim
09:43:40GitDisc<NopeDK> Can a Nimble package in any way add flags to the compilers of importing projects, e.g. if package A is imported by project then the flag "-d:A_something" should be passed to the Nim compiler and the flag "-DA_someotherthing" should be passed to the c compiler.
09:44:31*happycoder quit (Ping timeout: 248 seconds)
09:46:48FromGitter<mratsim> @nopedk, unfortunately no, I asked :/. What you can add is {.passL: foo.} and {.passC: bar.} pragma
09:48:37Araqwhat's wrong with .passC ?
09:49:50GitDisc<NopeDK> The flags would be generated dynamically by a binary so I would probably need to do a hack by having a Nim file in the library that gets updated by some other executable to load the flags from the binary.
09:50:57*happycoder2 quit (Ping timeout: 248 seconds)
09:52:03*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:52:23*claudiuinberlin joined #nim
09:58:39*endragor quit (Remote host closed the connection)
09:59:00GitDisc<NopeDK> To explain a bit better: I am trying to create a library for integrating Nim with uwsgi but depending on how uwsgi was installed and what libraries were available at that time, the flags for the compiler changes. So if you install uwsgi while having libssl installed, ssl support gets added and a flag "_uwsgi_ssl" is added to the list of flags that the binary uses and generates. This means that pro <message clipped>
10:00:37*endragor joined #nim
10:15:32*cspar quit (Ping timeout: 252 seconds)
10:19:42FromGitter<mratsim> Trying to get Nim on top of Hacker News, vote: https://news.ycombinator.com/item?id=15993654
10:20:54*chemist69 quit (Ping timeout: 272 seconds)
10:21:46*yglukhov joined #nim
10:23:09*vlad1777d_ joined #nim
10:28:12FromGitter<mratsim> And /r/programming: https://www.reddit.com/r/programming/comments/7lnza1/arraymancer_teaching_nim_language_digit/
10:28:43FromGitter<mratsim> and /r/machinelearning: https://www.reddit.com/r/MachineLearning/comments/7lnzo6/p_arraymancer_teaching_nim_language_digit/
10:29:04FromGitter<mratsim> another in /r/datascience/ when reeddit rate limit expires
10:29:48*happycoder joined #nim
10:34:14*happycoder quit (Ping timeout: 252 seconds)
10:34:16FromGitter<mratsim> https://www.reddit.com/r/datascience/comments/7lo0hd/arraymancer_teaching_nim_language_digit/
10:34:32*chemist69 joined #nim
10:37:29FromGitter<gokr> @dom96 Hey
10:39:59*Arrrr joined #nim
10:44:55FromGitter<mratsim> and /r/deeplearning: https://www.reddit.com/r/deeplearning/comments/7lo1ps/arraymancer_teaching_nim_language_digit/
10:45:04FromGitter<mratsim> I think its impossible to get on top of HN :/
10:45:22*geocar quit (Quit: Connection closed for inactivity)
10:53:05*yglukhov quit (Remote host closed the connection)
11:02:51*happycoder joined #nim
11:07:51*jjido joined #nim
11:09:17*jjido quit (Client Quit)
11:12:36*sz0 quit (Quit: Connection closed for inactivity)
11:13:13zielmicha_Is compiler as a service (with caching of modules) doable with current compiler architecture? `nim serve` seems to be removed long ago - I've played a bit with reimplementation abusing nimsuggest support, but couldn't get it fully to work due to clashing symbols in c codegen. (I'm asking, because the project I'm working on has annoyingly long compile times)
11:13:24FromGitter<dom96> @mratsim your link on HN gets mobile users to the project's github :(
11:13:44FromGitter<dom96> You might wish to create a dedicated article somewhere about recognising digits.
11:18:24FromGitter<mratsim> Writing an article is so long :/ will do next time with OpenCL.
11:19:27*happycoder quit (Ping timeout: 248 seconds)
11:41:51*happycoder joined #nim
11:45:29*SenasOzys quit (Ping timeout: 256 seconds)
11:46:07*SenasOzys joined #nim
11:50:41*happycoder quit (Ping timeout: 252 seconds)
11:59:03*xkapastel quit (Quit: Connection closed for inactivity)
12:01:39*yglukhov joined #nim
12:05:57*yglukhov quit (Ping timeout: 240 seconds)
12:06:14*yglukhov joined #nim
12:12:58*nsf quit (Quit: WeeChat 1.9.1)
12:25:07*Vladar joined #nim
12:29:41*dddddd joined #nim
12:30:31*Arrrr quit (Quit: Leaving.)
12:53:09*BitPuffin|osx quit (Ping timeout: 264 seconds)
12:56:23*Yardanico joined #nim
13:01:37*antizealot1337 joined #nim
13:05:10*antizealot1337 quit (Client Quit)
13:07:14*happycoder joined #nim
13:15:43*happycoder quit (Ping timeout: 248 seconds)
13:20:54*Snircle joined #nim
13:41:01FromGitter<alehander42> @mratsim I've been several times on the frontpage of HN but in very random moments, there isn't really a good pattern, except choosing a good time to post
13:41:21FromGitter<alehander42> but top 1 is probably hard indeed
13:43:27FromGitter<alehander42> you have to really hit some stange combination of reasonable interesting stuff mixed with buzzwords in the title
13:44:36*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:45:28*Snircle joined #nim
13:51:43*marenz joined #nim
13:51:48*gangstacat quit (Ping timeout: 272 seconds)
13:55:21FromGitter<nitely> @mratsim getting on HN's frontpage requires persistence
13:56:38FromGitter<mratsim> Next title will be OpenCL Numpy and Deep Learning in Nim.
13:56:48*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:57:24*Snircle joined #nim
13:57:51FromGitter<nitely> you can post the same article multiple times (after a week or so, check th guidelines)
13:58:27*gangstacat joined #nim
13:58:35dom96Another pro tip with HN: don't post direct links to what you submitted
13:59:00dom96IIRC they have an algorithm that detects people directly going to a URL and voting on it
13:59:06dom96You should go to /newest and do it that way
14:00:58*natrys joined #nim
14:02:31dom96Anyone know why random.random was renamed to random.rand? (https://github.com/nim-lang/Nim/commit/196977f623c3e3384e943c08cb85e6e0ded31109#r26450475)
14:05:00Yardanicodom96, Araq knows :P
14:05:18Yardanicodom96, https://github.com/nim-lang/Nim/issues/6934
14:05:21Yardanicoread Araq's comment
14:06:48dom96I see
14:07:05*dom96 adds to the changelog
14:07:39Yardanicoit's already in changelog, no?
14:07:45Yardanicohttps://github.com/nim-lang/Nim/commit/196977f623c3e3384e943c08cb85e6e0ded31109#diff-42ba1d994f4fa8c6ad17a7efae7936ccR131
14:09:14dom96The reason isn't
14:09:19Yardanicoah
14:09:26dom96Ugh, why is every item under "Changes affecting backwards compatibility"?
14:18:02FromGitter<data-man> @dom96: I'm glad you liked the elapsed time in the tester. But 'sexy' was a last word that I thought when I added this feature. 
14:18:10*ftsf_ joined #nim
14:18:27dom96data-man: Thank you adding it :D
14:18:31dom96*you for
14:18:43*Yardanico quit (Quit: Leaving)
14:18:49*Yardanico_ joined #nim
14:18:51*Yardanico_ quit (Remote host closed the connection)
14:19:13*Yardanico joined #nim
14:20:15*ftsf quit (Ping timeout: 248 seconds)
14:20:52FromGitter<data-man> Maybe to add a some statistics? For example, the longest test.
14:21:41Yardanicoyglukhov, still no recording ? :( https://twitter.com/yglukhov/status/940517916067418112
14:21:45dom96nah, I think we can look through them if we want to find tests that take too long
14:27:29FromGitter<data-man> @dom96: Please, help me with https://github.com/nim-lang/Nim/pull/6936#discussion_r158512611 :-)
14:27:43Yardanicohmm, interesting stuff https://github.com/hiway/octoclaus
14:29:05dom96Yardanico: nice find :O
14:29:18Yardanicodom96, github search ftw
14:30:17Yardanicoand again some interesting stuff: https://github.com/SyscalineGaming/sultan
14:32:41dom96data-man: I commented with an explanation
14:33:22dom96not easy to fix unfortunately :\
14:33:39dom96unless there is a new way to initialise thread variables implicitly in all new threads
14:33:51Yardanicobtw, a lot of Nim repos were created for solving Advent of Code 2017: https://github.com/search?utf8=%E2%9C%93&q=created%3A2017-12-02+language%3ANim&type=Repositories
14:34:21dom966, I wouldn't call that a lot :)
14:34:48Yardanicowell also the day before
14:37:12FromGitter<zacharycarter> https://github.com/SyscalineGaming/sultan/blob/master/sultan.nim
14:37:15FromGitter<zacharycarter> yikes
14:38:34Yardanicoyeah
14:38:48YardanicoI feel bad for that person if he wrote that by hand
14:44:21FromGitter<data-man> dom96: I looked at the code in the /tests/parallel/tsendtwice.nim. It works there.
14:45:28*yamate joined #nim
14:45:35yamatehelo all
14:45:59yamatei'm new in nim
14:45:59yglukhovYardanico: nope, it should be published on https://www.youtube.com/channel/UCsoDB2oN7D5U7BSAp9yy2Dw, i think...
14:46:06yamateis nim gargabe compiler language ?
14:46:33yamateshould my sister (age 10, girl), learn this programming language ?
14:46:34FromGitter<zacharycarter> do you mean garbage collected?
14:46:38awalNim is garbage collected, yes.
14:46:47yamatei mean
14:47:02yamateit will be darn easy for newbie
14:47:05yamate?
14:47:09yamate*for my 10 sister
14:47:18yamatehe want learn programming
14:48:00awalPerhaps. Perhaps though you should choose a more popular language with more readily available documentation and googleable help.
14:48:14awalEcosystem and everything.
14:48:20yamatewhat
14:48:29yamateis nim ecosystem is really bad ?
14:48:32yamatelike you "say"
14:49:43FromGitter<data-man> @yamate: https://www.lifewire.com/kids-programming-languages-4125938 :-)
14:50:08awalI'll concede by saying that some mainstream languages have better ecosystem and are better suited as a good-first-language.
14:50:51yamatenope, Scratch just for kid
14:51:17yamatepython is better
14:51:29yamateis darn easy to know / use
14:51:43yamateyep, i'll learn python too
14:51:53yamatebzoc currently i'm HTML Programmer
14:53:00FromGitter<codenoid> umm, actualy HTML Is not programming language
14:56:08FromGitter<data-man> @yamate: Your sister is sure that at the age of ten she is already an adult? :-)
14:56:25*Trustable joined #nim
14:56:33*bozaloshtsh quit (Quit: ok)
14:58:17FromGitter<zacharycarter> I think he meant his 10 sisters
14:59:00yamateyup
14:59:04yamatemy age is 10
14:59:16yamateand i have 10 sister
14:59:20yamate"sister"
14:59:25yamateactually my brother xD
14:59:31yamatei call them like tat
15:00:03yamateokay see yaa, we will learn pithony
15:00:11*UxerUospr joined #nim
15:00:14FromGitter<zacharycarter> good luck!
15:03:44dom96lol
15:04:03FromGitter<data-man> :-)
15:04:03FromGitter<zacharycarter> yeah that was def amusing
15:09:46FromGitter<alehander42> I wish I had 10 brothers like him
15:10:22FromGitter<mratsim> At 10 I definitely didn't know how to setup mIRC.
15:12:34FromGitter<alehander42> I didn't have access to a computer when I was 10
15:21:16*UxerUospr quit (Quit: Lost terminal)
15:21:51*cornfeedhobo joined #nim
15:34:35FromGitter<mratsim> I was hacking the children time limitations by changing the day/time in the bios of the family computer at 12 I think.
15:44:19dom96I started working on Nim when I was about 13 :)
15:45:11*NimBot joined #nim
15:46:34cornfeedhobowhen did you write the book?
15:47:27*yglukhov quit (Remote host closed the connection)
15:50:18dom96I started writing 2.5 years ago IIRC
15:50:45FromGitter<zacharycarter> My parents were both into software so I was on a computer early
15:51:00FromGitter<zacharycarter> I didn't really get into writing software until after college
16:08:03*endragor quit (Remote host closed the connection)
16:11:41FromGitter<data-man> My first "PC" was https://en.wikipedia.org/wiki/Elektronika_MK-52
16:15:16FromGitter<data-man> I still have it. :)
16:19:28FromGitter<tim-st> Does anyone know if a tuple[name: string] is converted by the compiler to just name: string?
16:20:28Yardanicotim-st: I don't think so
16:20:39Yardanicoyou can check in C code :)
16:22:36*endragor joined #nim
16:25:54FromGitter<tim-st> @Yardanico I meant gcc not the nim transcompiler
16:26:41Yardanicopro tip: don't call nim as transpiler or transcompiler :)
16:27:21*endragor quit (Ping timeout: 264 seconds)
16:27:33Yardanicotim-st: https://stackoverflow.com/questions/19887384/do-c-compilers-optimize-structs-with-a-single-member
16:29:23Yardanicobut I can't really find any gcc-specific info about this :)
16:29:56FromGitter<tim-st> @Yardanico Thanks, for the link that helps!
16:30:09FromGitter<tim-st> @Yardanico btw: https://en.wikipedia.org/wiki/Source-to-source_compiler
16:30:27Yardanicoohh, you better not to start this :)
16:30:29Yardanico"This article has multiple issues. "
16:31:04FromGitter<tim-st> Ah, ok. :D
16:32:57Yardanicohttps://news.ycombinator.com/item?id=15160347
16:33:43FromGitter<tim-st> Does c++ just translates to c?
16:33:58Yardanicoit was compiled to C in 80s
16:35:02FromGitter<tim-st> Ok, didn't know that :O
16:37:02dom96"A source-to-source compiler translates between programming languages that operate at approximately the same level of abstraction"
16:37:13dom96C and Nim are not the same level of abstraction
16:37:53*Vladar quit (Remote host closed the connection)
16:38:45FromGitter<tim-st> Ok, didn't want to say something bad :D
16:39:20FromGitter<tim-st> It was just in my head, I think I read this somewhere some months ago
16:39:51*happycoder joined #nim
16:40:55FromGitter<tim-st> On the wiki page is says "Examples of transcompiled languages include [...] Nim [...]." 
16:40:59FromGitter<data-man> Any 'true' compiler is transpiler. Into machines code. :-)
16:41:14FromGitter<tim-st> Yes, that's true
16:42:32Yardanicotim-st: I'll correct that :P
16:43:21FromGitter<tim-st> Btw. is there any page that lists some "tricks" the gcc compiler makes? People often write it's very smart, but they can't answer what the compiler can. The thing is that often think about optimize my code because I'm not sure if the compiler is smart enough to see the way to optimize like I see.
16:44:28FromGitter<tim-st> For example a proc return a seq and I compare it to len(seq), instead it could operate on an index saved in the object but it's easier to me to write the trivial code instead of thinking about the indices again
16:45:25Yardanicotim-st: I think the list would be too big :P
16:45:54FromGitter<tim-st> @Yardanico You can try to correct it :D Maybe some kind of a book?
16:46:10Yardanicotim-st: I mean I edited the page on Wiki
16:46:38FromGitter<tim-st> Yes I know, but some page have moderators who don't like some changes without literature link
16:46:59Yardanicoa lot of people already want to remove this page
16:47:06Yardanicohttps://en.wikipedia.org/wiki/Talk:Source-to-source_compiler
16:47:11FromGitter<tim-st> :D
16:52:34*Vladar joined #nim
16:56:01*natrys quit (Quit: natrys)
16:58:49*xkapastel joined #nim
17:02:52*Jesin joined #nim
17:07:21*happycoder quit (Ping timeout: 260 seconds)
17:09:35*Arrrr joined #nim
17:21:49*happycoder joined #nim
17:25:39*gokr joined #nim
17:38:17*yamate quit (Ping timeout: 252 seconds)
17:42:46*skrylar quit (Remote host closed the connection)
17:50:55*yamate joined #nim
17:52:28FromGitter<zacharycarter> https://github.com/JodiTheTigger/sewing
18:01:39*yamate quit (Quit: Leaving)
18:07:31*happycoder quit (Ping timeout: 265 seconds)
18:10:56GitDisc<NopeDK> I believe Araq himself began talking about transpiler on IRC
18:11:35*jjido joined #nim
18:23:57*MJCaley joined #nim
18:39:24Araqno, I talked about transfinitepreters
18:40:48Araqthese support transfinite recursions, it's the next level after quantum computing
18:42:09*solitudesf quit (Quit: solitudesf)
18:45:57GitDisc<NopeDK> Ah my bad. All those trans' confuse me.
19:03:40YardanicoxD
19:05:28Yardanicowill nim support quantum PCs in 2030?
19:08:24*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:13:03FromGitter<zacharycarter> I want to play with that sewing library
19:13:15FromGitter<zacharycarter> and try calling Nim code with it
19:13:26FromGitter<zacharycarter> I bet the entire lib could be ported to Nim
19:14:49Yardanicoif it's written in ASM mostly, I doubt
19:15:02Yardanicobecause you need ASM
19:15:10Yardanicofor arch/system specific calls
19:15:18Yardaniconim needs them too
19:15:25Yardanicoyou can see here - https://github.com/JodiTheTigger/sewing/tree/master/src/asm
19:15:26FromGitter<zacharycarter> ah
19:16:08*dddddd quit (Remote host closed the connection)
19:17:01Yardanicobut yeah, main C file probably can be ported to Nim
19:17:58Yardanicobut this library has multiple issues too: https://github.com/JodiTheTigger/sewing/issues/13
19:19:46FromGitter<zacharycarter> apparently so
19:27:48FromGitter<mratsim> Interesting read “Saying NO to PR as an Open-source maintainer": https://blog.jessfraz.com/post/the-art-of-closing/
19:28:44*Arrrr quit (Ping timeout: 272 seconds)
19:31:15*Arrrr joined #nim
19:31:15*Arrrr quit (Changing host)
19:31:15*Arrrr joined #nim
19:52:17*pydsigner quit (Ping timeout: 250 seconds)
19:53:33*pydsigner joined #nim
20:07:27*nsf joined #nim
20:11:41*Yardanico quit (Read error: Connection reset by peer)
20:14:15*cspar joined #nim
20:32:45*Arrrr quit (Read error: Connection reset by peer)
20:41:13*Tiberium joined #nim
20:44:48*iAmSlow joined #nim
20:45:24iAmSlowso can somone explain me some things
20:45:57iAmSlownim compiles down to C , can use c and c++ libs ?
20:45:59*MJCaley quit (Quit: MJCaley)
20:46:01Tiberiumyes
20:46:55FromGitter<mratsim> and Objective C and Javascript
20:47:06iAmSlowso whats the bad side, i personaly dont like whitespaces form phyton but from what i read about it functnality wise it sounds 10time better then c#
20:47:20iAmSlowi am thinking of starting learning nim paraler
20:47:46FromGitter<mratsim> No ones know about Nim so the library ecosystem is 100x smaller than in popular language
20:48:03iAmSlowtough i read the nimturtorial page and i kinda undsturde moste stuff
20:48:22FromGitter<mratsim> If you’re lucky or working on low level stuff it’s fine, but if you’re not you will need to build the basic blocks
20:48:23iAmSlowyes but if i can pigiback from c and c++ libs
20:49:04*Tiberium quit (Quit: Textual IRC Client: www.textualapp.com)
20:49:10FromGitter<mratsim> yes if you can use C or C++ it’s great, but it really depends, if you need a C++ framework like QT (or GTK) it’s a world of pain.
20:49:15GitDisc<NopeDK> It is not a "release" yet, still "beta" so to say but with active development. Things may yet change in libraries, breaking upgrades. It is not a popular language (yet, hopefully), so libraries and implementations are scarcer than languages like Go and Node.js.
20:50:05FromGitter<mratsim> The good thing is that the core devs are on IRC and very responsive, and the community is also very helpful
20:50:07iAmSlowisent there soem numix or somhow like that crossplatofrm GUI lib
20:50:27GitDisc<NopeDK> NimUI I believe is its name
20:50:46iAmSlowpossible duno i was reading this moring
20:51:19iAmSlowanyway, really concept whise duno why nim isent more popular
20:51:31GitDisc<NopeDK> And yes, the IRC is a nice place. Having the main devs as well as a lot who want to invest in the language available and willing to help is awesome.
20:51:50iAmSlowfrom what i read only thing it sux is not being Case sensitve
20:51:53FromGitter<mratsim> cross platform GUI is a bit experimental, you will very likely hit roadblocks I think. See blog post of John Novak (he build a ray tracer from scratch in Nim): http://blog.johnnovak.net/2016/05/29/cross-platform-gui-trainwreck-2016-edition/
20:52:10iAmSlowand whitespaces, tought i think sombody told me i can use {} whit some mod
20:52:10GitDisc<NopeDK> Also, marketing, Nim isn't that known.
20:53:15Araqjust use the whitespace.
20:53:24Araqwhat's wrong with it anyway?
20:53:33iAmSlowduno i used to c#
20:53:34FromGitter<mratsim> case insensitiveness is a feature, subtile bug like `getRate` vs `getrate` vs `get_rate` which are usually not catched in code review are removed
20:54:01iAmSlowguess i can use #{ ahahhaha
20:54:11GitDisc<NopeDK> The casing can be nice as everyone can write in their preferred way (camel, underscore, whatever). I do prefer the spacing so have no tips to that, I have heard about the {} mod as well but will probably never use it.
20:54:45Araqmratsim: well it usually doesn't cause bugs in a statically typed environment
20:55:09iAmSlowit gives comple error
20:55:20iAmSlowbut not really a dealbraker for me at least
20:55:30Araqthe idea always was that your editor can render the identifiers as you prefer when there is no technical difference
20:55:40FromGitter<mratsim> tell that to people wrapping SDL and having SDLQuit vs SDLquit distinction ;)
20:57:15Araqyou can only ever dream of such a render feature when the case doesn't matter to begin with, that said, it's a minor thing when everybody should follow NEP1 anyway :P
20:58:09FromGitter<mratsim> Well in any case, breaking/unlearning habits take about 21 days ;) according to studies so you will be uncomfortable for only 3 weeks and then whitespaces will be your best friends.
20:58:10GitDisc<NopeDK> Or when C libraries decide to use "appid" and "app_id" for different fields...
20:58:43GitDisc<NopeDK> And you want to interface with them
20:59:11FromGitter<mratsim> you can rename while importc
21:00:19Araqyou should rename it anyway so that the names are clear, appid vs app_id --- yeah, no idea what's the difference
21:00:41iAmSlow so when beta ends?
21:00:52iAmSlowroadmap on github is form 2016 i thik
21:01:28*Yardanico joined #nim
21:02:02FromGitter<matrixbot> `hiway` Hi, been using Nim for a few days. Barging in to say thank you to all who are working on it and for the articles :D
21:02:34YardanicoBtw, you can connect to IRC via matrix
21:02:53Yardanicofreenode irc I Mean
21:03:29iAmSlowduno who you teling, why would i need matrix
21:03:41YardanicoI'm telling that to hiway
21:04:05GitDisc<NopeDK> I am indeed renaming them, at least just to remove the name confusion.
21:04:28iAmSlowlol i dont see him, but dont remember i muted him
21:04:42FromGitter<matrixbot> `hiway` @Yardanico: yup, i am connected via Matrix
21:04:57Yardanicohiway: you're using gitter bridge with matrix
21:05:20YardanicoI think it's better to use IRC bridge since the most part of nim chat is IRC (but it's connected to gitter)
21:06:59AraqiAmSlow: beta ends within the next months, todo list are essentially the bugs marked as "high priority" or "showstopper"
21:07:17Araqso ... there is a plan now and the issue tracker reflects it, kinda
21:07:30iAmSlowty for info
21:07:43FromGitter<matrixbot> `hiway` Ah, I installed Riot a few hours ago, and am new to Matrix - found this room in search; point me in the right direction?
21:08:58GitDisc<NopeDK> Yardanico, perhaps something to reduce the tags on the bridges. See hiway as "<FromGitter> <matrixbot> hiway" if possible?
21:09:07*MJCaley joined #nim
21:09:29YardanicoGitDisc, what do you mean?
21:09:40Yardanicohiway: https://gist.github.com/fstab/ce805d3001600ac147b79d413668770d#how-to-use-a-freenode-registered-nickname-on-matrixorg
21:10:17FromGitter<matrixbot> `hiway` Thank you
21:10:28GitDisc<NopeDK> Yardanico, you meant to tag me with that last message?
21:10:45Yardanicoyeah, sry ;)
21:14:37GitDisc<NopeDK> Currently all messages have a tag in front to show the interface they use. So Discord users probably have "<discord> $name" in front of everything. Now, hiway for example uses a bridge from "matrix" to "gitter" to IRC (and for me, to discord) giving all his messages the following structure "<FromGitter> <matrixbot> $name $msg".
21:14:39GitDisc<NopeDK> Perhaps someway to reduce that to "<D>" for any messages originating from discord, even if it passes through other bridges, gitter would get "<G>". Matrix would get only "<M>" even if it passes through Gitter on the way.
21:15:29Yardanicowell I can do that only for my irc-discord bridge
21:15:33Yardanicogitter-irc bridge isn't mine
21:16:01GitDisc<NopeDK> Okay, was just wondering if it was possible, could be something for the future?
21:16:32*Yardanico quit (Remote host closed the connection)
21:19:39*Tiberium joined #nim
21:19:50*Vladar quit (Quit: Leaving)
21:20:06FromGitter<dom96> This is one reason it would make sense to have a single not that handles relaying between all services.
21:20:12FromGitter<dom96> *bot
21:20:27Tiberiumwell I use matterbridge for irc-discord
21:20:32Tiberiumit has support for gitter too
21:20:53Tiberium(sorry for my nickname, logged in from hackintosh which I haven't used in the past 3 months)
21:21:57*Tiberium quit (Client Quit)
21:25:24*Tiberium joined #nim
21:25:26GitDisc<NopeDK> And perhaps a "<I>" for messages related to other services from IRC. This way we can slowly centralize to "<$service_id> $name $msg" for all platforms reading readability as names and tags don't use the same brackets, braces and what not. (I thought his name was "matrixbot" before I caught the multilayered redirection )
21:26:04*Tiberium is now known as Yardanico
21:29:17FromGitter<dom96> Yeah... It clips messages btw.
21:29:34FromGitter<dom96> Which FromGitter handles well
21:30:05Yardanicothis can be changed in config :)
21:30:09FromGitter<matrixbot> `hiway` @Yardanico: Followed the instructions. Testing - does this message show up from IRC bridge?
21:30:17Yardanicono
21:30:26Yardanicomatterbridge has pretty extensive configuration: https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.sample
21:30:44FromGitter<dom96> So configure it.
21:31:05GitDisc<NopeDK> ^ lol
21:32:05cornfeedhoboi'm working on a bot that centralizes relaying, among other functions, but it's not in nim
21:32:21Yardanicowell matterbridge aims to do the same
21:33:18FromGitter<dom96> cornfeedhobo: why not? :/
21:33:21*cspar quit (Ping timeout: 248 seconds)
21:33:24*beatmox quit (Remote host closed the connection)
21:33:28*hiway joined #nim
21:33:35Yardanicowe can also add telegram, matrix, slack
21:33:39Yardanicowith matterbridge
21:33:55*beatmox joined #nim
21:34:22cornfeedhoboheh looks like matterbridge beat me too it. mine is a plugable bot, just has architectural support for replays as first class citizens
21:35:15cornfeedhobodoes matterbridge support many-to-one, or many-to-many?
21:35:33Yardanicomany to many
21:35:37cornfeedhobonice
21:35:43Yardanicoyou can add gateways between different services
21:35:51Yardanicowell in config file
21:37:21FromGitter<mratsim> Soon, Nimbridge :P
21:38:30hiwayOh btw, I made a thing with Nim to give it a spin: https://github.com/hiway/octoclaus - would love feedback on where I could improve idioms/ style/ ?
21:38:47*cspar joined #nim
21:39:49FromGitter<mratsim> ah we discussed it like 5 hours ago ;) awesome work
21:40:15hiwayOh, I sent it here before? :O
21:40:19hiwaySorry
21:40:21Yardaniconah
21:40:28YardanicoI found it and posted here :)
21:40:35hiwayOoh :P
21:41:04Yardanicogithub search
21:41:17FromGitter<mratsim> Yardanico is a Nimja, always in the shadow finding Nim stuff, he’s specialized in Russian Intelligence on their Hacker News equivalent Habrbr something
21:41:31Yardanicohabrahabr :P
21:41:42hiwayAnd thank you to all, I am awed by Nim (had tried it a few years ago, knew less, didn't "get" it)
21:41:43hiwayhehe
21:41:43Yardanicoand sadly I didn't write any other articles about Nim on Habr (yet)
21:42:16FromGitter<zacharycarter> hrm - is lib/pure/coro.nim planned to be expanded upon?
21:42:32FromGitter<zacharycarter> the reason I ask is, I don't see many imports of it anywhere
21:44:32FromGitter<mratsim> the documentation is a bit dry, I don’t even know where to start using it.
21:45:17hiwaymratsim: Yes, I see that now. Will work on it.
21:45:45FromGitter<mratsim> If we’re looking from the Python dev coming to Nim, I think most uses `yield from` to yield from an iterator in another (lightweight - same processor) thread
21:46:02FromGitter<mratsim> @hiway, it was not for you, it was for coro
21:46:51FromGitter<mratsim> your doc is already great, the screenshot speaks volume :P
21:47:02hiwaymratsim: yikes; seems I latched on to what I was thinking anyway for something else.
21:47:08hiwayhehe
21:47:31*Yardanico quit (Quit: Textual IRC Client: www.textualapp.com)
21:47:36hiwayI found that there's a commit elaborating on where it could be used that I haven't pushed yet.
21:56:57*Tiberium joined #nim
21:57:05*Tiberium quit (Client Quit)
22:00:09*dddddd joined #nim
22:00:39*iAmSlow quit (Quit: Leaving)
22:03:04dom96I think the plan was to switch async to use 'coro'
22:03:13dom96But I don't recall the point of that
22:03:26FromGitter<zacharycarter> interesting
22:03:31dom96I think the idea is that it lets you yield from any procedure
22:04:13GitDisc<NopeDK> Is it possible to set the length of a (c)string? I have a pointer to the location and a length and want to convert it to a (c)string.
22:06:24*Tiberium joined #nim
22:07:58dom96a pointer to the start of a string is already a cstring
22:08:16dom96so I'm not sure why you're writing (c)string
22:09:00dom96to make a string I think you'd have to copy the cstring into a new string
22:09:02GitDisc<NopeDK> I want to convert it to strings on a higher level and used the parenthesis to denote that it being a cstring wasn't necessary, string would be enough.
22:09:59*Tiberium quit (Client Quit)
22:12:38dom96I'm not entirely sure what you mean then. But you can set the length of a string using setLen
22:14:39GitDisc<NopeDK> Basically, I got a char * imported from C in a struct with fields for pointer and field for length, wanted to know whether I could set the length as I don't know if cstring just works when you got a pointer since it internally has a length field (or is it an iterator that counts the length each time?).
22:19:50*Trustable quit (Remote host closed the connection)
22:25:21*Tiberium joined #nim
22:29:50GitDisc<NopeDK> Won't be needed anyways, I don't want to recreate the buffer manipulation done under the hood and it handles the generation of pointers and length which means I only need to abstract it to the higher levels.
22:30:25FromGitter<mratsim> so much boilerplate in OpenCL :O https://github.com/nim-lang/opencl/blob/master/examples/test.nim (kernel, program, commandQueue, memory buffer, device ID …) well at least Nim from 4 years ago still compile
22:31:25FromGitter<Varriount> NopeDK: A cstring represents a pointer to a null-terminated character array
22:33:00GitDisc<NopeDK> When getting a cstring, does it then need to iterate over all chars to get the actual string and/or length each time?
22:34:33GitDisc<NopeDK> Or just the first time to set its internal length field?
22:34:44FromGitter<RedBeard0531> NopeDK if you have a ptr and len, you can do something like this to get it into a string: https://github.com/RedBeard0531/nimja/blob/master/utils.nim#L32-L40. That works even if the string isn't null terminated, or if the nul termination is somewhere other than at len.
22:35:43*Tiberium quit (Quit: Textual IRC Client: www.textualapp.com)
22:35:50FromGitter<RedBeard0531> (leave out the call to shallow() unless you know it is safe)
22:36:59GitDisc<NopeDK> RedBeard0531, nice trick, thanks.
22:38:00Araqmratsim: it's only a wrapper, I didn't create any helpers
22:49:49GitDisc<NopeDK> Anyone know about my last question, whether reading a cstring iterates through all chars every time or only once?
22:51:33FromGitter<RedBeard0531> I think every time, just like c. Unless it can tell the answer before then like in `"asdf" == "qwer".cstring`
22:52:23GitDisc<NopeDK> Suspected that was the case, thanks again :)
22:52:48FromGitter<RedBeard0531> Not that on x86_64 glibc, strlen is effectively O(1) up to 48 or 64 bytes (can't recall exactly which)
22:53:19FromGitter<RedBeard0531> *Note that\
22:55:37FromGitter<mratsim> @Araq I’m fine with that, I’m just complaining about Khronos API not about your nim wrapper ;)
22:55:38GitDisc<NopeDK> I should change my name to PiTheSlowpoke, that would explain my limitations much better xD
22:56:23Araqlol what kind of definition is that
22:56:32*nsf quit (Quit: WeeChat 1.9.1)
22:56:49Araqstrlen() is O(1) since you can only have strings of 32GB in size
22:57:16Araqeverything is O(1)!
22:57:36Araqwow modern machines with their limited amount of storage are brilliant
23:01:47*arecacea1 quit (Read error: Connection reset by peer)
23:02:08*arecacea1 joined #nim
23:04:19*gokr quit (Quit: Leaving.)
23:05:20FromGitter<RedBeard0531> I meant that it doesn't loop less than that. Up to 64 bytes it only checks the first 16 (in a single op) then if that doesn't find anything it plows through the next 48: https://github.com/bminor/glibc/blob/master/sysdeps/x86_64/strlen.S#L119-L142
23:16:40Araqsure I know.
23:17:48Araqhttps://github.com/nim-lang/Nim/issues/6869 could you fix this?
23:20:00FromGitter<RedBeard0531> Yeah, I think so
23:22:39FromGitter<RedBeard0531> I was looking into fixing https://github.com/nim-lang/Nim/issues/6836, but I couldn't figure out what this comment meant since those words don't seem sorted to me https://github.com/nim-lang/Nim/blob/devel/compiler/wordrecg.nim#L18
23:26:23*MJCaley quit (Quit: MJCaley)
23:27:08Araqthey are sorted by category
23:27:33AraqC/C++ keywords are one range
23:41:19*Tiberium joined #nim
23:41:35FromGitter<RedBeard0531> It seems like none of the tests that I've seen in the main repo use the unittest module. Is that a matter of policy, or were they just written before that module was available?
23:41:49Araqpolicy.
23:42:13Araqthat module hates me and I hate it.
23:42:25FromGitter<RedBeard0531> why is it in stdlib then?
23:42:41Araqit's the *std*lib, not Araq's lib
23:42:52Araq(sad, I know)
23:43:18dom96I don't think it's the case that none of the tests use it
23:43:29Araqthe policy is to not use it.
23:43:43Araqthat policy didn't always exist.
23:47:17Araqplus of course we need tests for the unittest module and these are allowed to use unittest ...
23:47:44Araqbut not for testing unittest via unittest
23:50:56*Tiberium quit (Quit: Textual IRC Client: www.textualapp.com)
23:52:39*Yardanico joined #nim
23:53:51*Yardanico quit (Remote host closed the connection)
23:55:05*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:56:02*Yardanico joined #nim
23:58:11*Yardanico quit (Remote host closed the connection)