00:16:15 | radagast | Withing a type, how do you declare a member to be mutable/immutable? |
00:29:42 | FromGitter | <Quelklef> I doubt you can |
00:29:49 | FromGitter | <Quelklef> since that's defined by the type of the member |
00:29:57 | FromGitter | <Quelklef> and its exposed procs |
00:31:52 | * | happycoder joined #nim |
00:32:28 | FromGitter | <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:01 | FromGitter | <mratsim> @radagast, there is no deep immutability. |
06:18:08 | * | sz0 joined #nim |
06:18:55 | FromGitter | <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:51 | FromGitter | <tekjar> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
06:48:18 | FromGitter | <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:27 | nc-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:09 | FromGitter | <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:40 | FromGitter | <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:50 | FromGitter | <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:40 | GitDisc | <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:48 | FromGitter | <mratsim> @nopedk, unfortunately no, I asked :/. What you can add is {.passL: foo.} and {.passC: bar.} pragma |
09:48:37 | Araq | what's wrong with .passC ? |
09:49:50 | GitDisc | <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:00 | GitDisc | <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:42 | FromGitter | <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:12 | FromGitter | <mratsim> And /r/programming: https://www.reddit.com/r/programming/comments/7lnza1/arraymancer_teaching_nim_language_digit/ |
10:28:43 | FromGitter | <mratsim> and /r/machinelearning: https://www.reddit.com/r/MachineLearning/comments/7lnzo6/p_arraymancer_teaching_nim_language_digit/ |
10:29:04 | FromGitter | <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:16 | FromGitter | <mratsim> https://www.reddit.com/r/datascience/comments/7lo0hd/arraymancer_teaching_nim_language_digit/ |
10:34:32 | * | chemist69 joined #nim |
10:37:29 | FromGitter | <gokr> @dom96 Hey |
10:39:59 | * | Arrrr joined #nim |
10:44:55 | FromGitter | <mratsim> and /r/deeplearning: https://www.reddit.com/r/deeplearning/comments/7lo1ps/arraymancer_teaching_nim_language_digit/ |
10:45:04 | FromGitter | <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:13 | zielmicha_ | 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:24 | FromGitter | <dom96> @mratsim your link on HN gets mobile users to the project's github :( |
11:13:44 | FromGitter | <dom96> You might wish to create a dedicated article somewhere about recognising digits. |
11:18:24 | FromGitter | <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:01 | FromGitter | <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:21 | FromGitter | <alehander42> but top 1 is probably hard indeed |
13:43:27 | FromGitter | <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:21 | FromGitter | <nitely> @mratsim getting on HN's frontpage requires persistence |
13:56:38 | FromGitter | <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:51 | FromGitter | <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:35 | dom96 | Another pro tip with HN: don't post direct links to what you submitted |
13:59:00 | dom96 | IIRC they have an algorithm that detects people directly going to a URL and voting on it |
13:59:06 | dom96 | You should go to /newest and do it that way |
14:00:58 | * | natrys joined #nim |
14:02:31 | dom96 | Anyone know why random.random was renamed to random.rand? (https://github.com/nim-lang/Nim/commit/196977f623c3e3384e943c08cb85e6e0ded31109#r26450475) |
14:05:00 | Yardanico | dom96, Araq knows :P |
14:05:18 | Yardanico | dom96, https://github.com/nim-lang/Nim/issues/6934 |
14:05:21 | Yardanico | read Araq's comment |
14:06:48 | dom96 | I see |
14:07:05 | * | dom96 adds to the changelog |
14:07:39 | Yardanico | it's already in changelog, no? |
14:07:45 | Yardanico | https://github.com/nim-lang/Nim/commit/196977f623c3e3384e943c08cb85e6e0ded31109#diff-42ba1d994f4fa8c6ad17a7efae7936ccR131 |
14:09:14 | dom96 | The reason isn't |
14:09:19 | Yardanico | ah |
14:09:26 | dom96 | Ugh, why is every item under "Changes affecting backwards compatibility"? |
14:18:02 | FromGitter | <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:27 | dom96 | data-man: Thank you adding it :D |
14:18:31 | dom96 | *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:52 | FromGitter | <data-man> Maybe to add a some statistics? For example, the longest test. |
14:21:41 | Yardanico | yglukhov, still no recording ? :( https://twitter.com/yglukhov/status/940517916067418112 |
14:21:45 | dom96 | nah, I think we can look through them if we want to find tests that take too long |
14:27:29 | FromGitter | <data-man> @dom96: Please, help me with https://github.com/nim-lang/Nim/pull/6936#discussion_r158512611 :-) |
14:27:43 | Yardanico | hmm, interesting stuff https://github.com/hiway/octoclaus |
14:29:05 | dom96 | Yardanico: nice find :O |
14:29:18 | Yardanico | dom96, github search ftw |
14:30:17 | Yardanico | and again some interesting stuff: https://github.com/SyscalineGaming/sultan |
14:32:41 | dom96 | data-man: I commented with an explanation |
14:33:22 | dom96 | not easy to fix unfortunately :\ |
14:33:39 | dom96 | unless there is a new way to initialise thread variables implicitly in all new threads |
14:33:51 | Yardanico | btw, 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:21 | dom96 | 6, I wouldn't call that a lot :) |
14:34:48 | Yardanico | well also the day before |
14:37:12 | FromGitter | <zacharycarter> https://github.com/SyscalineGaming/sultan/blob/master/sultan.nim |
14:37:15 | FromGitter | <zacharycarter> yikes |
14:38:34 | Yardanico | yeah |
14:38:48 | Yardanico | I feel bad for that person if he wrote that by hand |
14:44:21 | FromGitter | <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:35 | yamate | helo all |
14:45:59 | yamate | i'm new in nim |
14:45:59 | yglukhov | Yardanico: nope, it should be published on https://www.youtube.com/channel/UCsoDB2oN7D5U7BSAp9yy2Dw, i think... |
14:46:06 | yamate | is nim gargabe compiler language ? |
14:46:33 | yamate | should my sister (age 10, girl), learn this programming language ? |
14:46:34 | FromGitter | <zacharycarter> do you mean garbage collected? |
14:46:38 | awal | Nim is garbage collected, yes. |
14:46:47 | yamate | i mean |
14:47:02 | yamate | it will be darn easy for newbie |
14:47:05 | yamate | ? |
14:47:09 | yamate | *for my 10 sister |
14:47:18 | yamate | he want learn programming |
14:48:00 | awal | Perhaps. Perhaps though you should choose a more popular language with more readily available documentation and googleable help. |
14:48:14 | awal | Ecosystem and everything. |
14:48:20 | yamate | what |
14:48:29 | yamate | is nim ecosystem is really bad ? |
14:48:32 | yamate | like you "say" |
14:49:43 | FromGitter | <data-man> @yamate: https://www.lifewire.com/kids-programming-languages-4125938 :-) |
14:50:08 | awal | I'll concede by saying that some mainstream languages have better ecosystem and are better suited as a good-first-language. |
14:50:51 | yamate | nope, Scratch just for kid |
14:51:17 | yamate | python is better |
14:51:29 | yamate | is darn easy to know / use |
14:51:43 | yamate | yep, i'll learn python too |
14:51:53 | yamate | bzoc currently i'm HTML Programmer |
14:53:00 | FromGitter | <codenoid> umm, actualy HTML Is not programming language |
14:56:08 | FromGitter | <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:17 | FromGitter | <zacharycarter> I think he meant his 10 sisters |
14:59:00 | yamate | yup |
14:59:04 | yamate | my age is 10 |
14:59:16 | yamate | and i have 10 sister |
14:59:20 | yamate | "sister" |
14:59:25 | yamate | actually my brother xD |
14:59:31 | yamate | i call them like tat |
15:00:03 | yamate | okay see yaa, we will learn pithony |
15:00:11 | * | UxerUospr joined #nim |
15:00:14 | FromGitter | <zacharycarter> good luck! |
15:03:44 | dom96 | lol |
15:04:03 | FromGitter | <data-man> :-) |
15:04:03 | FromGitter | <zacharycarter> yeah that was def amusing |
15:09:46 | FromGitter | <alehander42> I wish I had 10 brothers like him |
15:10:22 | FromGitter | <mratsim> At 10 I definitely didn't know how to setup mIRC. |
15:12:34 | FromGitter | <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:35 | FromGitter | <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:19 | dom96 | I started working on Nim when I was about 13 :) |
15:45:11 | * | NimBot joined #nim |
15:46:34 | cornfeedhobo | when did you write the book? |
15:47:27 | * | yglukhov quit (Remote host closed the connection) |
15:50:18 | dom96 | I started writing 2.5 years ago IIRC |
15:50:45 | FromGitter | <zacharycarter> My parents were both into software so I was on a computer early |
15:51:00 | FromGitter | <zacharycarter> I didn't really get into writing software until after college |
16:08:03 | * | endragor quit (Remote host closed the connection) |
16:11:41 | FromGitter | <data-man> My first "PC" was https://en.wikipedia.org/wiki/Elektronika_MK-52 |
16:15:16 | FromGitter | <data-man> I still have it. :) |
16:19:28 | FromGitter | <tim-st> Does anyone know if a tuple[name: string] is converted by the compiler to just name: string? |
16:20:28 | Yardanico | tim-st: I don't think so |
16:20:39 | Yardanico | you can check in C code :) |
16:22:36 | * | endragor joined #nim |
16:25:54 | FromGitter | <tim-st> @Yardanico I meant gcc not the nim transcompiler |
16:26:41 | Yardanico | pro tip: don't call nim as transpiler or transcompiler :) |
16:27:21 | * | endragor quit (Ping timeout: 264 seconds) |
16:27:33 | Yardanico | tim-st: https://stackoverflow.com/questions/19887384/do-c-compilers-optimize-structs-with-a-single-member |
16:29:23 | Yardanico | but I can't really find any gcc-specific info about this :) |
16:29:56 | FromGitter | <tim-st> @Yardanico Thanks, for the link that helps! |
16:30:09 | FromGitter | <tim-st> @Yardanico btw: https://en.wikipedia.org/wiki/Source-to-source_compiler |
16:30:27 | Yardanico | ohh, you better not to start this :) |
16:30:29 | Yardanico | "This article has multiple issues. " |
16:31:04 | FromGitter | <tim-st> Ah, ok. :D |
16:32:57 | Yardanico | https://news.ycombinator.com/item?id=15160347 |
16:33:43 | FromGitter | <tim-st> Does c++ just translates to c? |
16:33:58 | Yardanico | it was compiled to C in 80s |
16:35:02 | FromGitter | <tim-st> Ok, didn't know that :O |
16:37:02 | dom96 | "A source-to-source compiler translates between programming languages that operate at approximately the same level of abstraction" |
16:37:13 | dom96 | C and Nim are not the same level of abstraction |
16:37:53 | * | Vladar quit (Remote host closed the connection) |
16:38:45 | FromGitter | <tim-st> Ok, didn't want to say something bad :D |
16:39:20 | FromGitter | <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:55 | FromGitter | <tim-st> On the wiki page is says "Examples of transcompiled languages include [...] Nim [...]." |
16:40:59 | FromGitter | <data-man> Any 'true' compiler is transpiler. Into machines code. :-) |
16:41:14 | FromGitter | <tim-st> Yes, that's true |
16:42:32 | Yardanico | tim-st: I'll correct that :P |
16:43:21 | FromGitter | <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:28 | FromGitter | <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:25 | Yardanico | tim-st: I think the list would be too big :P |
16:45:54 | FromGitter | <tim-st> @Yardanico You can try to correct it :D Maybe some kind of a book? |
16:46:10 | Yardanico | tim-st: I mean I edited the page on Wiki |
16:46:38 | FromGitter | <tim-st> Yes I know, but some page have moderators who don't like some changes without literature link |
16:46:59 | Yardanico | a lot of people already want to remove this page |
16:47:06 | Yardanico | https://en.wikipedia.org/wiki/Talk:Source-to-source_compiler |
16:47:11 | FromGitter | <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:28 | FromGitter | <zacharycarter> https://github.com/JodiTheTigger/sewing |
18:01:39 | * | yamate quit (Quit: Leaving) |
18:07:31 | * | happycoder quit (Ping timeout: 265 seconds) |
18:10:56 | GitDisc | <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:24 | Araq | no, I talked about transfinitepreters |
18:40:48 | Araq | these support transfinite recursions, it's the next level after quantum computing |
18:42:09 | * | solitudesf quit (Quit: solitudesf) |
18:45:57 | GitDisc | <NopeDK> Ah my bad. All those trans' confuse me. |
19:03:40 | Yardanico | xD |
19:05:28 | Yardanico | will nim support quantum PCs in 2030? |
19:08:24 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:13:03 | FromGitter | <zacharycarter> I want to play with that sewing library |
19:13:15 | FromGitter | <zacharycarter> and try calling Nim code with it |
19:13:26 | FromGitter | <zacharycarter> I bet the entire lib could be ported to Nim |
19:14:49 | Yardanico | if it's written in ASM mostly, I doubt |
19:15:02 | Yardanico | because you need ASM |
19:15:10 | Yardanico | for arch/system specific calls |
19:15:18 | Yardanico | nim needs them too |
19:15:25 | Yardanico | you can see here - https://github.com/JodiTheTigger/sewing/tree/master/src/asm |
19:15:26 | FromGitter | <zacharycarter> ah |
19:16:08 | * | dddddd quit (Remote host closed the connection) |
19:17:01 | Yardanico | but yeah, main C file probably can be ported to Nim |
19:17:58 | Yardanico | but this library has multiple issues too: https://github.com/JodiTheTigger/sewing/issues/13 |
19:19:46 | FromGitter | <zacharycarter> apparently so |
19:27:48 | FromGitter | <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:24 | iAmSlow | so can somone explain me some things |
20:45:57 | iAmSlow | nim compiles down to C , can use c and c++ libs ? |
20:45:59 | * | MJCaley quit (Quit: MJCaley) |
20:46:01 | Tiberium | yes |
20:46:55 | FromGitter | <mratsim> and Objective C and Javascript |
20:47:06 | iAmSlow | so 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:20 | iAmSlow | i am thinking of starting learning nim paraler |
20:47:46 | FromGitter | <mratsim> No ones know about Nim so the library ecosystem is 100x smaller than in popular language |
20:48:03 | iAmSlow | tough i read the nimturtorial page and i kinda undsturde moste stuff |
20:48:22 | FromGitter | <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:23 | iAmSlow | yes but if i can pigiback from c and c++ libs |
20:49:04 | * | Tiberium quit (Quit: Textual IRC Client: www.textualapp.com) |
20:49:10 | FromGitter | <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:15 | GitDisc | <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:05 | FromGitter | <mratsim> The good thing is that the core devs are on IRC and very responsive, and the community is also very helpful |
20:50:07 | iAmSlow | isent there soem numix or somhow like that crossplatofrm GUI lib |
20:50:27 | GitDisc | <NopeDK> NimUI I believe is its name |
20:50:46 | iAmSlow | possible duno i was reading this moring |
20:51:19 | iAmSlow | anyway, really concept whise duno why nim isent more popular |
20:51:31 | GitDisc | <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:50 | iAmSlow | from what i read only thing it sux is not being Case sensitve |
20:51:53 | FromGitter | <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:10 | iAmSlow | and whitespaces, tought i think sombody told me i can use {} whit some mod |
20:52:10 | GitDisc | <NopeDK> Also, marketing, Nim isn't that known. |
20:53:15 | Araq | just use the whitespace. |
20:53:24 | Araq | what's wrong with it anyway? |
20:53:33 | iAmSlow | duno i used to c# |
20:53:34 | FromGitter | <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:01 | iAmSlow | guess i can use #{ ahahhaha |
20:54:11 | GitDisc | <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:45 | Araq | mratsim: well it usually doesn't cause bugs in a statically typed environment |
20:55:09 | iAmSlow | it gives comple error |
20:55:20 | iAmSlow | but not really a dealbraker for me at least |
20:55:30 | Araq | the idea always was that your editor can render the identifiers as you prefer when there is no technical difference |
20:55:40 | FromGitter | <mratsim> tell that to people wrapping SDL and having SDLQuit vs SDLquit distinction ;) |
20:57:15 | Araq | you 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:09 | FromGitter | <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:10 | GitDisc | <NopeDK> Or when C libraries decide to use "appid" and "app_id" for different fields... |
20:58:43 | GitDisc | <NopeDK> And you want to interface with them |
20:59:11 | FromGitter | <mratsim> you can rename while importc |
21:00:19 | Araq | you should rename it anyway so that the names are clear, appid vs app_id --- yeah, no idea what's the difference |
21:00:41 | iAmSlow | so when beta ends? |
21:00:52 | iAmSlow | roadmap on github is form 2016 i thik |
21:01:28 | * | Yardanico joined #nim |
21:02:02 | FromGitter | <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:34 | Yardanico | Btw, you can connect to IRC via matrix |
21:02:53 | Yardanico | freenode irc I Mean |
21:03:29 | iAmSlow | duno who you teling, why would i need matrix |
21:03:41 | Yardanico | I'm telling that to hiway |
21:04:05 | GitDisc | <NopeDK> I am indeed renaming them, at least just to remove the name confusion. |
21:04:28 | iAmSlow | lol i dont see him, but dont remember i muted him |
21:04:42 | FromGitter | <matrixbot> `hiway` @Yardanico: yup, i am connected via Matrix |
21:04:57 | Yardanico | hiway: you're using gitter bridge with matrix |
21:05:20 | Yardanico | I 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:59 | Araq | iAmSlow: beta ends within the next months, todo list are essentially the bugs marked as "high priority" or "showstopper" |
21:07:17 | Araq | so ... there is a plan now and the issue tracker reflects it, kinda |
21:07:30 | iAmSlow | ty for info |
21:07:43 | FromGitter | <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:58 | GitDisc | <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:29 | Yardanico | GitDisc, what do you mean? |
21:09:40 | Yardanico | hiway: https://gist.github.com/fstab/ce805d3001600ac147b79d413668770d#how-to-use-a-freenode-registered-nickname-on-matrixorg |
21:10:17 | FromGitter | <matrixbot> `hiway` Thank you |
21:10:28 | GitDisc | <NopeDK> Yardanico, you meant to tag me with that last message? |
21:10:45 | Yardanico | yeah, sry ;) |
21:14:37 | GitDisc | <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:39 | GitDisc | <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:29 | Yardanico | well I can do that only for my irc-discord bridge |
21:15:33 | Yardanico | gitter-irc bridge isn't mine |
21:16:01 | GitDisc | <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:06 | FromGitter | <dom96> This is one reason it would make sense to have a single not that handles relaying between all services. |
21:20:12 | FromGitter | <dom96> *bot |
21:20:27 | Tiberium | well I use matterbridge for irc-discord |
21:20:32 | Tiberium | it has support for gitter too |
21:20:53 | Tiberium | (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:26 | GitDisc | <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:17 | FromGitter | <dom96> Yeah... It clips messages btw. |
21:29:34 | FromGitter | <dom96> Which FromGitter handles well |
21:30:05 | Yardanico | this can be changed in config :) |
21:30:09 | FromGitter | <matrixbot> `hiway` @Yardanico: Followed the instructions. Testing - does this message show up from IRC bridge? |
21:30:17 | Yardanico | no |
21:30:26 | Yardanico | matterbridge has pretty extensive configuration: https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.sample |
21:30:44 | FromGitter | <dom96> So configure it. |
21:31:05 | GitDisc | <NopeDK> ^ lol |
21:32:05 | cornfeedhobo | i'm working on a bot that centralizes relaying, among other functions, but it's not in nim |
21:32:21 | Yardanico | well matterbridge aims to do the same |
21:33:18 | FromGitter | <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:35 | Yardanico | we can also add telegram, matrix, slack |
21:33:39 | Yardanico | with matterbridge |
21:33:55 | * | beatmox joined #nim |
21:34:22 | cornfeedhobo | heh looks like matterbridge beat me too it. mine is a plugable bot, just has architectural support for replays as first class citizens |
21:35:15 | cornfeedhobo | does matterbridge support many-to-one, or many-to-many? |
21:35:33 | Yardanico | many to many |
21:35:37 | cornfeedhobo | nice |
21:35:43 | Yardanico | you can add gateways between different services |
21:35:51 | Yardanico | well in config file |
21:37:21 | FromGitter | <mratsim> Soon, Nimbridge :P |
21:38:30 | hiway | Oh 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:49 | FromGitter | <mratsim> ah we discussed it like 5 hours ago ;) awesome work |
21:40:15 | hiway | Oh, I sent it here before? :O |
21:40:19 | hiway | Sorry |
21:40:21 | Yardanico | nah |
21:40:28 | Yardanico | I found it and posted here :) |
21:40:35 | hiway | Ooh :P |
21:41:04 | Yardanico | github search |
21:41:17 | FromGitter | <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:31 | Yardanico | habrahabr :P |
21:41:42 | hiway | And thank you to all, I am awed by Nim (had tried it a few years ago, knew less, didn't "get" it) |
21:41:43 | hiway | hehe |
21:41:43 | Yardanico | and sadly I didn't write any other articles about Nim on Habr (yet) |
21:42:16 | FromGitter | <zacharycarter> hrm - is lib/pure/coro.nim planned to be expanded upon? |
21:42:32 | FromGitter | <zacharycarter> the reason I ask is, I don't see many imports of it anywhere |
21:44:32 | FromGitter | <mratsim> the documentation is a bit dry, I don’t even know where to start using it. |
21:45:17 | hiway | mratsim: Yes, I see that now. Will work on it. |
21:45:45 | FromGitter | <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:02 | FromGitter | <mratsim> @hiway, it was not for you, it was for coro |
21:46:51 | FromGitter | <mratsim> your doc is already great, the screenshot speaks volume :P |
21:47:02 | hiway | mratsim: yikes; seems I latched on to what I was thinking anyway for something else. |
21:47:08 | hiway | hehe |
21:47:31 | * | Yardanico quit (Quit: Textual IRC Client: www.textualapp.com) |
21:47:36 | hiway | I 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:04 | dom96 | I think the plan was to switch async to use 'coro' |
22:03:13 | dom96 | But I don't recall the point of that |
22:03:26 | FromGitter | <zacharycarter> interesting |
22:03:31 | dom96 | I think the idea is that it lets you yield from any procedure |
22:04:13 | GitDisc | <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:58 | dom96 | a pointer to the start of a string is already a cstring |
22:08:16 | dom96 | so I'm not sure why you're writing (c)string |
22:09:00 | dom96 | to make a string I think you'd have to copy the cstring into a new string |
22:09:02 | GitDisc | <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:38 | dom96 | I'm not entirely sure what you mean then. But you can set the length of a string using setLen |
22:14:39 | GitDisc | <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:50 | GitDisc | <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:25 | FromGitter | <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:25 | FromGitter | <Varriount> NopeDK: A cstring represents a pointer to a null-terminated character array |
22:33:00 | GitDisc | <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:33 | GitDisc | <NopeDK> Or just the first time to set its internal length field? |
22:34:44 | FromGitter | <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:50 | FromGitter | <RedBeard0531> (leave out the call to shallow() unless you know it is safe) |
22:36:59 | GitDisc | <NopeDK> RedBeard0531, nice trick, thanks. |
22:38:00 | Araq | mratsim: it's only a wrapper, I didn't create any helpers |
22:49:49 | GitDisc | <NopeDK> Anyone know about my last question, whether reading a cstring iterates through all chars every time or only once? |
22:51:33 | FromGitter | <RedBeard0531> I think every time, just like c. Unless it can tell the answer before then like in `"asdf" == "qwer".cstring` |
22:52:23 | GitDisc | <NopeDK> Suspected that was the case, thanks again :) |
22:52:48 | FromGitter | <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:19 | FromGitter | <RedBeard0531> *Note that\ |
22:55:37 | FromGitter | <mratsim> @Araq I’m fine with that, I’m just complaining about Khronos API not about your nim wrapper ;) |
22:55:38 | GitDisc | <NopeDK> I should change my name to PiTheSlowpoke, that would explain my limitations much better xD |
22:56:23 | Araq | lol what kind of definition is that |
22:56:32 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:56:49 | Araq | strlen() is O(1) since you can only have strings of 32GB in size |
22:57:16 | Araq | everything is O(1)! |
22:57:36 | Araq | wow 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:20 | FromGitter | <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:40 | Araq | sure I know. |
23:17:48 | Araq | https://github.com/nim-lang/Nim/issues/6869 could you fix this? |
23:20:00 | FromGitter | <RedBeard0531> Yeah, I think so |
23:22:39 | FromGitter | <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:08 | Araq | they are sorted by category |
23:27:33 | Araq | C/C++ keywords are one range |
23:41:19 | * | Tiberium joined #nim |
23:41:35 | FromGitter | <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:49 | Araq | policy. |
23:42:13 | Araq | that module hates me and I hate it. |
23:42:25 | FromGitter | <RedBeard0531> why is it in stdlib then? |
23:42:41 | Araq | it's the *std*lib, not Araq's lib |
23:42:52 | Araq | (sad, I know) |
23:43:18 | dom96 | I don't think it's the case that none of the tests use it |
23:43:29 | Araq | the policy is to not use it. |
23:43:43 | Araq | that policy didn't always exist. |
23:47:17 | Araq | plus of course we need tests for the unittest module and these are allowed to use unittest ... |
23:47:44 | Araq | but 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) |