00:12:34 | * | SusWombat joined #nim |
00:12:52 | FromGitter | <ephja> yes, the pointer to the element would probably point to something else upon reallocation of the sequence buffer |
00:18:09 | FromGitter | <adamrezich> well shoot, should've known that would be too easy. guess I'll have to change my refs to ptrs and make my own allocation system :p |
00:23:20 | FromGitter | <ephja> are you implying that the items are references? if so, then you don't need a reference to it since it already is a reference |
00:27:10 | FromGitter | <ephja> you can have pointers to the elements as long as you only manipulate the size beforehand |
00:27:33 | FromGitter | <ephja> but you might as well store element indices in that case |
00:49:14 | * | vlad1777d quit (Remote host closed the connection) |
01:09:57 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:13:59 | * | endragor joined #nim |
01:18:23 | * | endragor quit (Ping timeout: 248 seconds) |
01:23:35 | * | chemist69 joined #nim |
01:28:33 | * | ipjk_ quit (Quit: Leaving) |
01:34:42 | * | Ven`` joined #nim |
01:39:11 | FromGitter | <adamrezich> the items in the seq aren't references, but I wanted to get references to them |
01:40:42 | * | Kelp joined #nim |
01:40:53 | * | Serenitor quit (Quit: Leaving) |
01:55:23 | * | Kelp quit () |
02:02:34 | * | ipjk joined #nim |
02:02:34 | * | ipjk quit (Client Quit) |
02:05:25 | * | relax joined #nim |
02:24:29 | * | thomasross joined #nim |
02:25:32 | thomasross | hi, if I wanted to use a table instead of a sequence, what would the equivalent be here? var clients {.threadvar.}: seq[AsyncSocket] |
02:25:50 | thomasross | Is it possible to make thread variable objects? |
02:26:51 | relax | I kind of hate that so much more of my API is marked "public" so the unit tests can poke a little more. I take it this is just a fact of life? |
02:27:40 | thomasross | would it be like var clients {.threadvar.}: TableRef[String, AsyncSocket] ? |
02:44:12 | * | endragor joined #nim |
02:44:52 | * | pilne joined #nim |
02:50:41 | * | Ven`` quit (Ping timeout: 240 seconds) |
03:11:23 | FromGitter | <Varriount> relax: You can use a conditional and forward declarations |
03:21:03 | * | mahmudov quit (Remote host closed the connection) |
03:48:16 | * | pilne quit (Quit: Quitting!) |
03:49:54 | * | MyMind joined #nim |
03:50:48 | relax | Varriount: I'm sorry, I'm not sure what you mean. A parallel forward declaration will give another module visibility into fields that aren't marked public? |
03:58:35 | * | relax quit (Ping timeout: 240 seconds) |
04:04:17 | * | Jesin quit (Ping timeout: 260 seconds) |
04:07:12 | * | mahsav2 joined #nim |
04:09:31 | * | mahsav quit (Ping timeout: 246 seconds) |
04:15:08 | * | francisl joined #nim |
04:20:32 | * | Jesin joined #nim |
04:32:37 | * | BigEpsilon joined #nim |
04:41:30 | * | vivus quit (Quit: Leaving) |
04:59:52 | * | mahsav2 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
05:00:08 | * | mahsav joined #nim |
05:04:35 | * | miran joined #nim |
05:14:03 | * | francisl quit (Quit: francisl) |
05:14:23 | * | francisl joined #nim |
05:14:46 | * | miran quit (Remote host closed the connection) |
05:14:50 | * | francisl quit (Client Quit) |
05:48:49 | * | thomasross_ joined #nim |
05:49:17 | * | thomasross quit (Ping timeout: 260 seconds) |
05:58:23 | * | Vladar joined #nim |
05:59:19 | * | solitudesf joined #nim |
06:04:50 | FromGitter | <Grabli66> Hi. I have a ⏎ type LPDWORD = ptr DWORD; ⏎ var myvar : LPDWORD ⏎ myvar is initialized in winapi function ⏎ How i can convert myvar, that is ptr, to DWORD value? [https://gitter.im/nim-lang/Nim?at=59a8f882ee5c9a4c5f1fbda8] |
06:07:43 | * | BitPuffin|osx quit (Remote host closed the connection) |
06:07:57 | * | BitPuffin|osx joined #nim |
06:09:32 | FromGitter | <BigEpsilon> let value = myvar[] ? |
06:10:59 | FromGitter | <Grabli66> Thanks. |
06:26:18 | FromGitter | <Grabli66> May be you know? ⏎ I want to create binding to winapi function ⏎ BOOL WINAPI ReadDirectoryChangesW( ⏎ *In* HANDLE hDirectory, ⏎ *Out* LPVOID lpBuffer, ... [https://gitter.im/nim-lang/Nim?at=59a8fd8aba0f0f6e3805ace5] |
06:26:20 | * | solitudesf quit (Remote host closed the connection) |
06:29:47 | FromGitter | <Varriount> @Grabli66 I have an old module that uses ReadDirectoryChanges, you might look at that. |
06:30:37 | FromGitter | <Grabli66> Yes, i want. Please, give me link to that module |
06:31:20 | FromGitter | <Varriount> relax: use a "when defined(unittest)" to present a set of point declarations, otherwise present private versions. |
06:33:34 | Araq | varriount, relax: the unit test can also 'include' the module instead of 'import' it |
06:33:48 | Araq | much simpler, no 'when's required |
06:34:06 | FromGitter | <Varriount> @Grabli66 https://github.com/Varriount/Filemon/blob/master/Nimrod.patch |
06:34:38 | FromGitter | <Grabli66> @Varriount Thanks |
06:34:53 | FromGitter | <Varriount> Look at the winlean portion of the path file to see what the proper declaration for ReadDirectoryChanges is |
06:35:03 | FromGitter | <Varriount> *patch file |
06:37:01 | FromGitter | <Varriount> I need to go to bed, but if you post any questions to me, I'll answer them in the morning. |
06:37:25 | FromGitter | <Grabli66> Ok |
06:46:50 | * | nsf joined #nim |
06:53:41 | FromGitter | <Grabli66> How i can allocate new PDWORD? ⏎ type PDWORD = ptr DWORD |
06:58:25 | FromGitter | <zacharycarter> https://play.nim-lang.org/?gist=a8a303faa24a4efa152ea209f8fdda46 |
06:58:28 | FromGitter | <zacharycarter> @Grabli66 |
07:00:43 | FromGitter | <zacharycarter> not sure if that answers your question or not |
07:00:46 | FromGitter | <zacharycarter> but hopefully it does |
07:02:11 | FromGitter | <Grabli66> It's strange. In playground it works. But on local machine i got "type mismatch: got (ref PDWORD) but expected 'PDWORD =ptr DWORD' |
07:02:52 | FromGitter | <zacharycarter> weird |
07:02:56 | FromGitter | <zacharycarter> what version of Nim are you using? |
07:03:18 | FromGitter | <Grabli66> Nim Compiler Version 0.17.0 (2017-05-18) [Windows: amd64] ⏎ Copyright (c) 2006-2017 by Andreas Rumpf |
07:03:53 | FromGitter | <zacharycarter> I'm not sure how to get the version of the playground :/ but I imagine it's even or newer |
07:04:04 | FromGitter | <zacharycarter> probably even |
07:06:35 | FromGitter | <Grabli66> var outLen = DWORD.create() ⏎ And it's created PDWORD |
07:06:51 | * | andrzejku joined #nim |
07:06:53 | andrzejku | hey |
07:06:54 | andrzejku | :) |
07:07:00 | * | PMunch joined #nim |
07:07:08 | FromGitter | <zacharycarter> Hi andrzejku |
07:07:39 | FromGitter | <zacharycarter> cool, glad you figured it out @Grabli66 |
07:08:34 | FromGitter | <Grabli66> Great. At last it works :) |
07:08:43 | FromGitter | <zacharycarter> That's the important thing! |
07:09:02 | andrzejku | thats interesting but why you guys create another language |
07:09:34 | FromGitter | <zacharycarter> I smell a troll |
07:09:45 | andrzejku | no |
07:10:19 | FromGitter | <zacharycarter> There are plenty of articles and now even a book espousing Nim's merits, please consult them if your inquiry is serious andrzejku |
07:10:20 | FromGitter | <Grabli66> But. Can i write like in C lang &somevar to pass a pointer of my variable to function? |
07:10:29 | FromGitter | <zacharycarter> somevar[] @Grabli66 |
07:10:33 | FromGitter | <zacharycarter> to deref |
07:10:40 | * | endragor quit (Remote host closed the connection) |
07:10:44 | FromGitter | <Grabli66> Great |
07:11:18 | FromGitter | <zacharycarter> you can also add the {.experimental.} pragma to your code and get auto dereferencing - at least I think that's still a thing |
07:14:28 | FromGitter | <Grabli66> It's dereferencing. ⏎ But i want pass argument as pointer. For example: ⏎ var mywar : DWORD = 0 ⏎ someProc(ptr myvar) # it's not work [https://gitter.im/nim-lang/Nim?at=59a908d4ba0f0f6e3805dd3f] |
07:15:24 | FromGitter | <zacharycarter> you want unsafeaddr |
07:15:25 | FromGitter | <zacharycarter> or addr |
07:15:58 | FromGitter | <zacharycarter> ```let foo: DWORD = 0 ⏎ someProc(addr foo)``` [https://gitter.im/nim-lang/Nim?at=59a9092ebac826f0546b2cbe] |
07:16:29 | FromGitter | <zacharycarter> or foo.addr |
07:16:32 | FromGitter | <Grabli66> Thanks. It's what i need. |
07:16:36 | FromGitter | <zacharycarter> sure thing |
07:18:41 | FromGitter | <BigEpsilon> @Araq, I'm looking at compiler/reorder, trying to identify what is left to be done. I'm in the computeDeps part. Can you give me a hint about what is missing or an example that does not work ? If have difficulty seeing where is the problem. Generic my cause a problem as they contain idents which counted as "uses" but I'm not sure. |
07:20:49 | Araq | bigepsilon: the problem is that currently 'type' sections are not merged |
07:21:02 | Araq | alternatively you can make the compiler frontend process |
07:21:10 | Araq | type A = B |
07:21:14 | Araq | type B = C |
07:21:16 | Araq | as |
07:21:17 | Araq | type |
07:21:19 | Araq | A = B |
07:21:22 | Araq | B = C |
07:21:36 | * | yglukhov joined #nim |
07:24:25 | FromGitter | <BigEpsilon> Ah ok |
07:24:45 | FromGitter | <BigEpsilon> so the dependency calculation is correct |
07:24:55 | FromGitter | <BigEpsilon> just need to work on the merge part |
07:25:41 | FromGitter | <BigEpsilon> Thanks ! |
07:32:58 | FromGitter | <BigEpsilon> ouch, that make the compiler crash: https://play.nim-lang.org/?gist=823464343df59c4b3b5bb6e1e5f65a8e |
07:33:30 | FromGitter | <BigEpsilon> https://gist.github.com/823464343df59c4b3b5bb6e1e5f65a8e |
07:34:13 | FromGitter | <BigEpsilon> I'll open an issue and look into it |
07:38:42 | * | PMunch_ joined #nim |
07:38:50 | * | PMunch_ quit (Remote host closed the connection) |
07:39:01 | * | PMunch_ joined #nim |
07:40:57 | PMunch_ | Hmm, I got disconnected but my old session is still active.. |
07:41:10 | PMunch_ | So PMunch is not just a ghost |
07:41:21 | * | PMunch quit (Ping timeout: 248 seconds) |
07:41:26 | * | PMunch_ is now known as PMunch |
07:41:46 | PMunch | Ah, there we go |
07:42:26 | Araq | oops, I broke boostrapping, working on it, relax |
07:48:12 | * | endragor joined #nim |
07:59:31 | FromGitter | <Grabli66> How i can convert array of Utf16Char to nim string? |
08:09:43 | Araq | should have used a WideCString which has a $ |
08:12:04 | crem | Gibt es irgendwelche Artikel über Nim in Deutsch? Sie müssen die beste Art sein, Deutsch zu lernen. Ich kann mir nichts besser ausdenken. |
08:15:06 | FromGitter | <Grabli66> I have a ⏎ type WideCharBuffer* = array[1, Utf16Char] ⏎ Winapi function fills it with some data. ⏎ And $ operator does not work for WideCharBuffer ⏎ It's need to convert somehow WideCharBuffer to string. [https://gitter.im/nim-lang/Nim?at=59a9170ab16f264642f43f22] |
08:17:16 | FromGitter | <Yardanico> Maybe cast it? |
08:17:40 | FromGitter | <Yardanico> But I'm |
08:17:47 | FromGitter | <Yardanico> Not sure |
08:18:20 | Araq | crem: glaub ich nicht. aber du kannst einfach hier mit mir Deutsch sprechen um die Sprache zu lernen. How hard can it be? |
08:24:12 | crem | Gut, dann wenn ich eine Frage über Nim haben werde, werde ich in Deutsch fragen. Ich hatte derselbe in #c++ versucht, aber es ist schwierig zu wählen, ob ich muss ein Englisches oder Deutsches Wort nutzen, z.B. pointer vs Zeiger. |
08:25:15 | FromGitter | <Grabli66> @Yardanico it does not want be casted to string :) |
08:26:59 | FromGitter | <couven92> crem, dein Deutsch hört sich aber ziemlich gut an. Ich antworte auch gerne auf Deutsch :) |
08:28:54 | * | Yardanico joined #nim |
08:32:57 | crem | Ich brauche einiger Minuten, einen Satz zu bauen. :) Und wenn ich eine Präposition zu wählen brauche, habe ich überhaupt keine Ahnung. (auf? aus? an? um? keine Idee) |
08:34:19 | Yardanico | crem, are you learning Deutsch ? :) |
08:34:23 | Araq | auf ~ on |
08:34:28 | Araq | aus ~ from |
08:34:38 | Araq | an ~ on ? |
08:34:58 | Araq | um ~ rarely the thing you need |
08:36:46 | crem | That's mostly easy, when it's about position/direction. But all those "smile at", "call someone", "go to school", "remember about" in German sound completely arbitrary. :) |
08:36:55 | crem | Yes, I learn Deutsch! :) |
08:38:28 | FromGitter | <couven92> crem, aber für Informatik... Ich würde nie Zeiger sagen... Fachsprache, also: Pointer |
08:40:30 | FromGitter | <couven92> crem, woher kommst du, was ist deine Muttersprache? |
08:41:22 | crem | Aus Wießrussland, Muttersprach ist Russisch. |
08:42:00 | crem | Und in Russisch übersetzen wir "Pointer"! |
08:43:42 | crem | Obwohl es gibt viele Informatische Wörter, die wie auch nicht übersetzen. |
08:43:46 | * | Matthias247 joined #nim |
08:44:17 | crem | Hm.... "Obwohl gibt es ..."? "Obwohl es ... gibt". Not sure about word order. |
08:48:43 | FromGitter | <couven92> Obwohl, es gibt... |
08:49:19 | FromGitter | <couven92> Ah, geht hier sogar ohne Komma |
08:50:16 | FromGitter | <couven92> Aber wäre es: obwohl es gibt viele Wörter, die... |
08:50:54 | FromGitter | <couven92> Was, Moment sry! Obwohl es viele Wörter gibt, die wir übersetzen |
08:51:32 | FromGitter | <couven92> Zu lange kein Deutsch mehr geschrieben :P |
08:51:46 | Araq | "Obwohl es auch viele informatische Wörter gibt, die wir auch nicht übersetzen" |
08:52:01 | Araq | "Obwohl es auch viele informatische Wörter gibt, die wir nicht übersetzen" |
08:53:25 | Yardanico | Can I get type implementation from macro by "typedesc"? |
08:54:36 | Yardanico | ah, getType then getImpl |
08:55:48 | Yardanico | hmm, or not |
08:58:36 | Yardanico | E.g. I get "typedesc" argument in my macro, and I want to get fields with their types (of this typedesc) |
09:00:34 | Yardanico | ah I got it |
09:00:40 | Yardanico | echo typ.getTypeInst()[1].symbol.getImpl().treeRepr |
09:01:36 | * | thomasross__ joined #nim |
09:04:01 | * | thomasross_ quit (Ping timeout: 240 seconds) |
09:04:01 | * | vlad1777d joined #nim |
09:26:13 | * | endragor quit (Remote host closed the connection) |
09:38:38 | * | couven92 joined #nim |
10:02:11 | * | endragor joined #nim |
10:06:55 | * | endragor quit (Ping timeout: 248 seconds) |
10:10:38 | * | dddddd joined #nim |
10:20:57 | * | endragor joined #nim |
10:25:53 | couven92 | how do you modify timeouts for nimsuggest in Visual Studio Code? |
10:25:59 | * | ShalokShalom_ joined #nim |
10:29:10 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
10:41:08 | Yardanico | couven92, what do you mean by timeouts? |
10:41:55 | couven92 | Yardanico, I though that it used a timeout to nimsuggest... But I thought wrong... I don't get any suggestions or definitions on symbols :( |
10:42:09 | Yardanico | couven92, well it means that nimsuggest is probably crashing |
10:42:11 | Yardanico | check debug log |
10:42:17 | couven92 | nothing there |
10:42:41 | Yardanico | couven92, in vscode debug log? |
10:42:49 | couven92 | yup, nothing there |
10:42:54 | Yardanico | strange |
10:43:02 | Yardanico | is your project closed-source? |
10:43:28 | couven92 | nope, I'm editing lib/pure/unicode.nim in the main repo! |
10:43:33 | Yardanico | ah |
10:43:59 | * | ShalokShalom_ is now known as ShalokShalom |
10:44:14 | couven92 | that's why I though timeouts first... the main repo is pretty big, so it might be that nimsuggest has to chew some extra ms to get an answer |
10:44:14 | Yardanico | well it works for me |
10:44:37 | Yardanico | well nimsuggest works for me on unicode.nim |
10:44:46 | Yardanico | but I haven't opened it as a project folder |
10:44:49 | Yardanico | just as separate file |
10:45:22 | Yardanico | hmm it works for me even if I open "Nim" folder |
10:45:29 | Yardanico | and open lib/pure/unicode.nim here |
10:45:37 | Yardanico | oh yes |
10:45:41 | Yardanico | nimsuggest is crashing :) |
10:45:48 | Yardanico | Nimsuggest returns unknown port number: SIGSEGV: |
10:45:52 | Yardanico | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
10:46:40 | Yardanico | it's not crashing anymore |
10:46:41 | Yardanico | hmm |
10:47:04 | Yardanico | couven92, can you try to open some empty folder and open "unicode.nim" as a separate file? |
10:47:07 | Yardanico | this might help |
10:50:38 | couven92 | found a crash |
10:54:10 | couven92 | https://github.com/pragmagic/vscode-nim/issues/59 |
10:54:21 | couven92 | It was a timeout issue! :) |
10:54:31 | couven92 | rejected promise not handled within 1 second |
11:09:56 | Yardanico | couven92, well nimsuggest can crash too :( |
11:10:05 | Yardanico | and there are some memory leaks in it, but no one knows here |
11:10:08 | Yardanico | *where |
11:11:57 | couven92 | that's the thing, I haven't experienced nimsuggest to crash on me |
11:12:14 | Yardanico | well yeah, it's a rare thing |
11:12:20 | Yardanico | but a big thing |
11:12:27 | Yardanico | E.g. if it crashes - it can restart |
11:12:34 | Yardanico | but memory leaks - it takes ALL ram on a PC |
11:12:38 | Yardanico | so only reboot :) |
11:17:50 | couven92 | For example now: Visual Studio Code does not give me any suggestions (nothing in the error log). But when I start nimsuggest with --stdin and command `sug lib/pure/unicode.nim:1521:46` I get `sug skVar lastIndex int C:\Users\fra006\Documents\Source\GitHub\nim-lang-Nim\lib\pure\unicode.nim 1514 4 "" 0 Prefix`` |
11:18:18 | couven92 | so it seems that nimsuggest is doing fine, but VS Code is doing a crappy job! |
11:27:12 | Yardanico | couven92, not vscode itself :) |
11:27:14 | Yardanico | nim plugin |
11:27:27 | Yardanico | but it's still very good i'd say |
11:34:19 | * | ipjk joined #nim |
11:45:16 | * | solitudesf joined #nim |
11:51:43 | * | dom96|w joined #nim |
12:00:39 | * | Snircle joined #nim |
12:21:18 | * | arnetheduck joined #nim |
12:36:24 | FromGitter | <zacharycarter> Yardanico: I deployed my Nim code at work yesterday that you were helping me with yesterday morning with all the async / await stuff :D |
12:36:41 | FromGitter | <zacharycarter> I'm plugging Nim in in secret, hopefully no one minds :P |
12:36:54 | Yardanico | Nice! :) |
12:37:25 | FromGitter | <zacharycarter> I still wonder if there's not a way to optimize that code further so I don't have to iterate over and yield every result |
12:37:47 | FromGitter | <zacharycarter> but I couldn't get asyncdispatch.all(...) working so I gave up and just went with yielding each response |
12:38:25 | ipjk | zach: Did you get nimble to work like you wanted to? |
12:39:13 | FromGitter | <zacharycarter> in which respect ipjk? |
12:39:34 | Yardanico | if you're bored or you want to help nim - pick random issues on github (which are at least 6 months old), and check if they're still actual :) |
12:39:37 | FromGitter | <zacharycarter> I ran into one nimble error yesterday afternoon and just used an alternative solution instead |
12:39:46 | ipjk | Where you tried to get various tasks to chain |
12:40:00 | FromGitter | <zacharycarter> ahr ight |
12:40:02 | ipjk | makefile esque |
12:40:30 | FromGitter | <zacharycarter> I found this forum post where they were doing something and I copied that, but nothing else, and it doesn't really work well beyond chaining 2 tasks together |
12:40:53 | FromGitter | <zacharycarter> https://forum.nim-lang.org/t/2222 |
12:40:58 | Yardanico | I counted ~13 issues some of which *may* be closed - https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc |
12:49:44 | * | MJCaley joined #nim |
12:49:49 | * | relax joined #nim |
12:50:48 | relax | @Araq thanks, perfect |
12:54:37 | Yardanico | Araq, I've left feedback on some old issues, check them if you'll have time |
12:59:44 | FromGitter | <Grabli66> Can i overload `=` operator? |
13:00:06 | ipjk | pretty sure you can |
13:00:23 | FromGitter | <Grabli66> But how? |
13:00:48 | Yardanico | can you give an example of which you want to do? |
13:01:14 | ipjk | proc `=`(a: int): ... |
13:02:06 | FromGitter | <Grabli66> type Boxed[T] = object of RootObj ⏎ ⏎ ```value: T``` ⏎ ⏎ proc `[]=`T (v : T) = BoxedT (value : v) ... [https://gitter.im/nim-lang/Nim?at=59a95a4e66c1c7c47704a3bc] |
13:02:37 | FromGitter | <Yardanico> can you paste code on gist? |
13:02:44 | FromGitter | <Yardanico> or paste here with proper backticks? |
13:02:50 | FromGitter | <Grabli66> Yes. Just a minute |
13:03:28 | FromGitter | <Grabli66> https://play.nim-lang.org/?gist=f18949b7642b9e458962162c5e099a8c |
13:04:45 | Yardanico | this isn't proper Nim syntax |
13:04:53 | FromGitter | <Grabli66> I know :) |
13:05:04 | couven92 | okay, unicode now also got tests for the new strutils procs and I found some errors which I fixed: https://github.com/nim-lang/Nim/pull/6301 |
13:05:06 | Yardanico | I mean you can't make this work |
13:05:22 | Yardanico | you should firstly declare "b" as a variable |
13:06:04 | Yardanico | hmm |
13:06:36 | Yardanico | ah, you want this operator to store your value in a box |
13:06:53 | FromGitter | <Grabli66> Yes |
13:07:52 | Yardanico | well I don't know about overloading, but why you can't just write it in this style? https://gist.github.com/anonymous/6325345a50764034bee52a5912b3ac05 |
13:08:13 | Yardanico | also - there are already Option types in nim stdlib (if you really need something like Boxed) |
13:08:45 | FromGitter | <Grabli66> Ok |
13:09:04 | Yardanico | well I'm not sure how you can make this overloading work |
13:10:01 | FromGitter | <Grabli66> And i dont know. :) It was just an experiment. I learn language |
13:10:28 | couven92 | Araq, AppVeyor fails? in osenv.nim which is nowhere near the changes I have made? https://ci.appveyor.com/project/dom96/nim/build/228 |
13:11:16 | Yardanico | couven92, https://github.com/nim-lang/Nim/commit/dcc72ea7a923fad684b0fd72855b3c0fe435db92 |
13:11:30 | Yardanico | ah wait |
13:11:38 | Yardanico | yeah |
13:11:43 | Yardanico | his commit fixed this issue |
13:11:56 | Yardanico | but I'm not sure why appveyor still failed |
13:12:30 | couven92 | probably because I haven't merged devel into my branch ye |
13:12:34 | couven92 | *yet |
13:12:49 | Yardanico | ah, yeah |
13:13:44 | * | endragor quit (Remote host closed the connection) |
13:20:06 | ipjk | Could it be that 'var ... = ...' is impossible to overload? |
13:20:20 | Yardanico | ipjk, yes |
13:20:26 | Yardanico | it probably could be |
13:20:59 | ipjk | I would also recommend keeping overloading of operators at minimum. |
13:21:19 | ipjk | Cosidering variable assignment is core language syntax |
13:22:12 | couven92 | AppVeyor still fails: https://ci.appveyor.com/project/dom96/nim/build/229 |
13:22:18 | couven92 | same error |
13:23:16 | FromGitter | <zacharycarter> there was a message from Araq earlier this morning |
13:23:27 | FromGitter | <zacharycarter> > **<Araq>** oops, I broke boostrapping, working on it, relax |
13:23:33 | ipjk | Grabli66: I'd go with Yardanico's example. It's more verbose but tells you exactly what it does. I like to think of operator overloading as uses in edge-cases. Like vectors, etc. |
13:23:37 | Yardanico | zach: he fixed it |
13:23:45 | FromGitter | <zacharycarter> oh |
13:24:14 | Yardanico | I'll try to port this https://www.youtube.com/watch?v=3mgGQR6oGxI to Nim :) |
13:24:18 | Yardanico | https://github.com/Hopson97/Empire |
13:24:30 | Yardanico | rules are fairly simple |
13:24:31 | * | solitude joined #nim |
13:25:00 | couven92 | this is the culprit: https://github.com/nim-lang/Nim/blame/devel/lib/pure/includes/osenv.nim#L21 |
13:25:08 | FromGitter | <zacharycarter> I should port my map generator to Nim |
13:25:18 | couven92 | it should be `when defined(useWinUnicode):` |
13:25:39 | Yardanico | why? |
13:25:53 | Yardanico | it shouldn't |
13:25:59 | couven92 | because `Error: undeclared identifier: 'useWinUnicode'` |
13:26:01 | Yardanico | it's a boolean - https://github.com/nim-lang/Nim/blob/0345238d6e90cf4daffe301e0c82a6e30741b2e2/lib/windows/winlean.nim#L21 |
13:26:39 | couven92 | oh? AH! AppVeyor fails when this happens in the nimscript tests! |
13:26:41 | * | solitudesf quit (Ping timeout: 240 seconds) |
13:27:01 | couven92 | And nimscript cannot include winlean, since nimscript doesn't do importc! |
13:27:08 | * | thomasross_ joined #nim |
13:27:09 | * | thomasross__ quit (Remote host closed the connection) |
13:29:01 | ipjk | Yardanico: actually, at 7:20, it's quite cool that's kind of how Sweden actually expanded |
13:29:26 | ipjk | https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Sweden_in_1658.PNG/250px-Sweden_in_1658.PNG |
13:30:51 | Yardanico | also I would implement it using sfml (via nim-csfml - wrapper to csfml - C wrapper for C++ sfml) :D |
13:30:58 | Yardanico | https://github.com/oprypin/nim-csfml |
13:31:49 | * | solitude quit (Remote host closed the connection) |
13:33:59 | couven92 | okay... issue filed: https://github.com/nim-lang/Nim/issues/6307 |
13:34:09 | * | gangstacat joined #nim |
13:36:51 | MJCaley | hi, i'm having trouble registering to the forum. i can't get the email since my mail server is rejecting it. it looks like the EHLO it's giving is just "mail" instead of a fully qualified domain name. does anyone know who i could talk to about that? maybe open an issue with the website issue tracker? |
13:37:20 | couven92 | MJCaley, talk to dom96 |
13:37:45 | Yardanico | he'll approve you manually :) |
13:38:17 | dom96|w | The NimForum uses Nim's smtp module to send emails |
13:38:43 | dom96|w | The source code for that module is in the Nim repo (just press 't' and type 'smtp') |
13:38:50 | dom96|w | The NimForum source code is also on GitHub |
13:38:54 | dom96|w | Under the nim-lang org |
13:39:07 | dom96|w | Feel free to create an issue on the nimforum repo |
13:43:32 | euantor | dom can also probably create you a user manually if you can't get the emails |
13:44:00 | euantor | It would be nice to add "login with GitHub" to the forums. I also still want to change the way sessions are handled and make some other changes when I get time |
13:44:38 | MJCaley | thanks, ya if i could get approved manually that'd be great in the meantime. I used the same username. |
13:44:54 | MJCaley | i don't think it's the forum code that's the problem, just the Postfix config |
13:45:42 | MJCaley | may mail server saw it give a hostname "mail" instead of like "mail.nim-lang.org" and got all whiney |
13:46:00 | * | endragor joined #nim |
13:47:27 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:49:04 | * | dom96|w joined #nim |
13:50:46 | * | endragor quit (Ping timeout: 264 seconds) |
13:55:21 | dom96|w | MJCaley: I activated your account. |
13:55:57 | dom96|w | Indeed, it's possibly an issue with the mail server. Please submit a bug report anyway. |
13:56:27 | * | MJCaley quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:59:00 | * | andrzejku quit (Quit: Leaving) |
14:01:04 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:09:14 | * | ipjk quit (Quit: Leaving) |
14:14:44 | * | xet7_ joined #nim |
14:15:13 | * | MJCaley joined #nim |
14:16:49 | FromGitter | <couven92> @Yardanico working on editDistance for Unicode now... didn't you have some testcases with Cyrillic literals in them? |
14:17:16 | Yardanico | simplest one |
14:17:25 | Yardanico | editDistance("привет", "превет") should return 1 |
14:17:36 | Yardanico | "и" - "е" |
14:19:11 | FromGitter | <couven92> Okay, I'll use that :) |
14:19:24 | MJCaley | thanks for the approval :) |
14:20:23 | MJCaley | i'll fire off an issue too |
14:36:48 | * | PMunch quit (Quit: Leaving) |
15:01:57 | * | MJCaley quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:07:08 | Araq | so ... I'm thinking about how an ORM should be done for Nim |
15:08:27 | Yardanico | Araq, functional style or complete SQL - Nim objects mapping? For example this https://docs.ponyorm.com/ (ab) uses python generators |
15:08:34 | Yardanico | to provide pythonic ORM |
15:08:46 | Yardanico | select(c for c in Customer if sum(c.orders.total_price) > 1000) |
15:08:52 | Yardanico | Customer.select(lambda c: sum(c.orders.total_price) > 1000) |
15:08:58 | * | xet7 quit (Quit: Leaving) |
15:09:00 | * | xet7_ quit (Quit: Leaving) |
15:09:22 | Yardanico | or maybe something simple like http://docs.peewee-orm.com/en/latest/peewee/quickstart.html |
15:09:28 | * | xet7 joined #nim |
15:10:39 | Araq | well nothing like that |
15:10:52 | FromGitter | <ephja> does "simple" imply potentially slow? |
15:11:18 | Yardanico | well pony orm converts your python generator expressions to SQL |
15:11:38 | FromGitter | <ephja> sqlalchemy seems to support most things, so it can probably be as fast as possible in most cases. I wonder if the complexity is justified though. some aspects are confusing |
15:12:05 | Araq | let q = select: |
15:12:05 | Araq | tableA: (a, b, c, d) |
15:12:05 | Araq | tableB: (x, y, z) |
15:12:07 | Araq | where a == _ or c == _ |
15:12:20 | Araq | for stuff in q(4, "boo"): ... |
15:12:21 | * | Trustable joined #nim |
15:12:31 | Yardanico | wow |
15:12:36 | Araq | 'select' is a macro that produces an interator |
15:12:36 | Yardanico | that's actually nice |
15:13:33 | Araq | however, I want to read an SQL description via parsesql and check column, table names are correct and that the typing rules are adhered to |
15:13:55 | FromGitter | <ephja> it might have been the joins in sqlalchemy that weren't obvious |
15:14:18 | FromGitter | <ephja> do the official libraries only work with strings? |
15:14:35 | Araq | actually there is a "raw" accessor too |
15:14:46 | Araq | which I intend to use |
15:14:56 | FromGitter | <ephja> it's a good starting point, because it's simple and often fast enough I'm sure |
15:14:58 | FromGitter | <ephja> right |
15:15:32 | Araq | I'm not sure how to do the compiletime checking |
15:15:33 | Yardanico | well I don't thing that ORM will be a bottleneck in some language like Nim :) |
15:15:57 | Araq | it should be optional |
15:16:01 | Yardanico | yeah |
15:16:16 | Araq | the question is mostly how to feed the 'select' macro the required information |
15:18:46 | Araq | also it needs to support the queries as string literals |
15:19:08 | Araq | because often you tweak these in the db REPL and then paste them into your program |
15:19:23 | Araq | so a Nim'ish syntax is not all that great |
15:26:34 | Yardanico | Araq, also maybe a possibility to debug generated queries? |
15:26:59 | Yardanico | I mean that macro would echo them |
15:27:26 | Araq | sure but the macro does query checking against the schema |
15:27:31 | Araq | no need to debug things :P |
15:27:45 | Araq | I think this would work: |
15:27:56 | Araq | parseStmt(staticExec("ormin", "my.db")) |
15:28:17 | Araq | where 'ormin' is my helper tool that parses SQL and produces Nim code |
15:30:05 | Araq | but hmmm if I have a tool that can parse SQL I might as well feed it the queries I need |
15:30:26 | Yardanico | hmm, it seems that appveyor doesn't offer 90-minute timeout for us anymore? |
15:30:29 | Yardanico | https://ci.appveyor.com/project/dom96/nim/build/230 |
15:30:35 | Yardanico | Build execution time has reached the maximum allowed time for your plan (60 minutes). |
15:31:16 | Araq | yeah suckers. |
15:32:25 | Yardanico | why Windows is generally slower at compiling software? not only nim |
15:32:38 | Yardanico | ah nvm |
15:33:22 | Yardanico | travis ci has 2hr timeout |
15:36:49 | Araq | we use gcc on windows, not really speedy |
15:37:00 | Araq | also the tester is still not parallel |
15:37:00 | Yardanico | ah |
15:37:03 | * | relax quit (Ping timeout: 248 seconds) |
15:42:20 | * | Vladar quit (Quit: Leaving) |
15:44:17 | dom96|w | You should take the approach that SQLAlchemy takes: many layers. |
15:44:27 | dom96|w | The lowest layer abstracts the differences between SQL servers. |
15:46:23 | Yardanico | well yeah, but sqlalchemy it's a bit too big |
15:47:50 | Araq | dom96|w: meh, that's lots of work and assumes one just pulled the decision of which DB to use out of one's ass |
15:48:13 | Araq | different DBs have different strengths and different features |
15:48:35 | Araq | abstract over these differences if you don't care about features or speed |
15:48:37 | dom96|w | Araq: So are you just going to support postgresql |
15:48:37 | dom96|w | ? |
15:48:58 | Araq | no, I support the db_* stuff we have |
15:49:39 | Araq | that's 2 layers then I guess, not "many" |
15:50:09 | Yardanico | so sqlite, postgresql, mysql? |
15:50:36 | Araq | yeah |
15:50:38 | dom96|w | so... you will be doing what I'm suggesting |
15:51:03 | Araq | I can bet SQLAlchemy uses more layers and 10x the amount of code |
15:51:20 | dom96|w | perhaps. |
15:51:43 | dom96|w | Just please consider this before implementing. |
16:06:30 | couven92 | Araq, see: https://github.com/nim-lang/Nim/issues/6307 |
16:08:13 | * | couven92 quit (Quit: Client disconnecting) |
16:08:38 | * | couven92 joined #nim |
16:11:53 | * | ipjk joined #nim |
16:13:30 | Araq | couven92: I fixed that? |
16:16:25 | * | gangstacat quit (Quit: Leaving) |
16:17:32 | couven92 | Ah, okay sorry... I'll close it then :) |
16:22:37 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:26:28 | * | PMunch joined #nim |
16:27:41 | * | nsf quit (Quit: WeeChat 1.9) |
16:27:57 | * | fredrik92 joined #nim |
16:28:10 | * | couven92 quit (Ping timeout: 240 seconds) |
16:32:18 | * | fredrik92 quit (Ping timeout: 252 seconds) |
16:44:45 | * | miran joined #nim |
17:17:24 | * | BitPuffin|osx quit (Ping timeout: 252 seconds) |
17:19:53 | * | couven92 joined #nim |
17:28:01 | * | Jesin quit (Read error: Connection reset by peer) |
17:28:10 | * | Jesin joined #nim |
17:29:24 | * | krux02 joined #nim |
17:30:25 | krux02 | hello |
17:30:49 | krux02 | is there a solution to this problem: http://ix.io/zx7 |
17:31:47 | Yardanico | krux02, AFAIK no, only if you create additonal variable |
17:32:01 | Yardanico | I mean |
17:32:08 | Yardanico | I don't know if you can modify "data" this way |
17:32:30 | krux02 | this is AFAIK something that nim really needs to be improved on |
17:32:50 | krux02 | I hit this problem several times and at some point in tim this really need to be fixed |
17:33:24 | Yardanico | is there a way to modify item in "data" sequence inside of a grid? https://gist.github.com/Yardanico/e08a99c0172833ac3576a46e21d9ab14 |
17:33:53 | thomasross_ | is there an equivalent of python's pass keyword? |
17:33:58 | * | thomasross_ is now known as thomasross |
17:33:58 | Yardanico | thomasross_, discard |
17:34:17 | thomasross | oh cool, you can just do discard with no arguments? |
17:34:21 | Yardanico | thomasross, yes |
17:34:26 | thomasross | awesome, thanks |
17:37:09 | Yardanico | probably I can solve this by overloading [] |
17:39:17 | Yardanico | hmm no |
17:40:04 | * | claudiuinberlin joined #nim |
17:40:33 | Yardanico | I'm trying to port this to Nim: https://gist.github.com/Yardanico/4700da43f28f22a1102183877d86ca50 |
17:40:57 | Yardanico | after you get needed value from vector you can change it and it'll be changed in vector too |
17:41:01 | Yardanico | because it's passed by reference |
17:41:18 | Yardanico | AFAIK you can't do "ref int" |
17:42:11 | krux02 | you can do a reference to an int |
17:42:16 | Yardanico | how? |
17:42:23 | krux02 | it's just confusing on how it is named |
17:42:27 | Yardanico | ptr ? |
17:42:38 | krux02 | proc foobar([...]): var int = ... |
17:43:02 | krux02 | proc foobar(i: var int): var int = i |
17:43:15 | krux02 | var i = 0; foobar(i) += 1 |
17:43:56 | krux02 | that is a real reference by the way, not like "ref" |
17:44:10 | Yardanico | well I want something like this - https://gist.github.com/Yardanico/7076367b6bef065c813e865b99bbd8b4 |
17:44:24 | Yardanico | and maybe I'm doing it in the wrong way |
17:44:49 | * | miran quit (Remote host closed the connection) |
17:44:50 | Yardanico | but C++ code has something like this: "auto& person = m_people(x, y);" where m_person is Grid of type Person |
17:45:05 | Yardanico | and if C++ code change "person", it'll be changed in m_people too |
17:45:12 | * | thomasross quit (Read error: Connection reset by peer) |
17:45:13 | krux02 | welll you can't assign a reference to a variable |
17:45:19 | krux02 | there you have to use a pointer |
17:45:29 | krux02 | nim does not support reference variables |
17:45:36 | krux02 | only in parameters and return values |
17:46:47 | krux02 | but what you can do, is to declare a local template that expands to an expression |
17:52:44 | Yardanico | krux02, ehm, but how? I've never written code in nim that needed stuff like this, so I don't know |
17:56:09 | krux02 | Yardanico: template myVal = grid[5, 3] |
17:56:14 | Yardanico | ah |
17:56:32 | Yardanico | Didn't know I can do this, thanks |
18:00:06 | * | relax joined #nim |
18:01:38 | loc8_ | Does Nim have a blog aggregator? |
18:03:19 | def- | loc8_: yes |
18:03:41 | loc8_ | Where? Couldn't find it through Google |
18:03:54 | def- | Me neither |
18:03:57 | Yardanico | :D |
18:03:58 | def- | But I remember that it exists |
18:06:07 | * | krux02 quit (Remote host closed the connection) |
18:06:09 | Yardanico | krux02, yeah, it worked when I changed `[]` to template and did "template myVal: untyped = grid[5, 3]" |
18:06:12 | * | gangstacat joined #nim |
18:11:01 | def- | loc8_: https://planet.nim-lang.org/ |
18:11:06 | def- | I think it's not on google |
18:11:13 | loc8_ | It's definitely not on Google |
18:11:26 | def- | It only has my blog and nim blog anyway, apparently |
18:11:34 | def- | and my blog not even filtered on nim |
18:12:49 | loc8_ | Also, why does it have a Haskell post? |
18:13:09 | Yardanico | loc8_, because it doesn't filter articles for nim |
18:13:13 | def- | because that's from my blog and I don't only post about Nim, should use this instead: https://hookrace.net/blog/nim/ |
18:13:24 | loc8_ | Oh, got it. |
18:14:35 | def- | I use an rss feed on https://www.reddit.com/r/nim/ instead to see new nim articles |
18:14:36 | * | endragor joined #nim |
18:15:26 | Yardanico | lol https://www.guitmz.com/linux-cephei-a-nim-virus/#.WagunTB-bmM.reddit |
18:17:42 | Demos[m] | I saw that :) |
18:18:58 | * | endragor quit (Ping timeout: 246 seconds) |
18:19:39 | dom96 | federico3 manages this IIRC |
18:19:44 | Demos[m] | Hmmmm anyone interested in AR visualization in nim? |
18:20:45 | Demos[m] | In particular looking at @zach |
18:21:19 | Yardanico | is there's something like "std::move" in C++ for nim? |
18:21:36 | Demos[m] | Shallowcopy |
18:21:43 | Yardanico | ah |
18:23:35 | Demos[m] | I don't know about move only types tho |
18:27:20 | * | thomasross joined #nim |
18:28:50 | * | nsf joined #nim |
18:29:26 | def- | {.shallow.} |
18:38:00 | Yardanico | lol |
18:38:13 | Yardanico | my custom range seems to be faster than .., what? |
18:39:14 | Yardanico | ah, nvm :) |
18:48:10 | FromGitter | <BigEpsilon> Yardanico, about move in nim https://forum.nim-lang.org/t/3111 |
18:48:58 | FromGitter | <BigEpsilon> But you can still use cpp move if you commit to c++ backend |
18:49:53 | FromGitter | <BigEpsilon> I did that for speeding an algorithm, together with using std::vector and std::deque |
18:50:05 | * | relax quit (Ping timeout: 240 seconds) |
18:50:18 | FromGitter | <BigEpsilon> That whats wonderfull with nim |
18:55:18 | * | gangstacat quit (Ping timeout: 252 seconds) |
19:03:15 | Yardanico | wow, 2800 closed issues |
19:06:18 | * | pilne joined #nim |
19:09:20 | * | haha_ joined #nim |
19:12:54 | * | couven92 quit (Ping timeout: 252 seconds) |
19:16:33 | * | hio joined #nim |
19:16:48 | hio | hi, is nim a good language for HIGH SPEED development? |
19:16:57 | Yardanico | hio, what do you mean? |
19:17:00 | Yardanico | productivity ratio? |
19:17:44 | hio | yeah |
19:18:03 | Yardanico | well it may be lower than python productivity ratio, but surely higher than C/C++/some other languages |
19:18:22 | Yardanico | also you get almost the best productivity ration/program performance ratio :) |
19:18:26 | Yardanico | *ratio |
19:18:50 | Araq | I never was productive in Python :P |
19:19:04 | hio | Which IDE with full intellisense and debugging can I use for Nim? |
19:19:20 | Yardanico | hio, there's no full IDE for nim, use VSCode + nim plugin I'd say |
19:19:30 | Yardanico | it will provide you with autocompletion, go to definiton |
19:19:35 | Yardanico | and GDB for debugging |
19:19:43 | Yardanico | but debugging is rarely needed |
19:19:50 | Yardanico | because nim checks a lot of things at compile time |
19:21:21 | Yardanico | Araq, I've found a couple of some fixed issues again :) |
19:21:53 | Araq | Yardanico: the number of bugs needs to be kept below 1000 :P |
19:22:03 | Yardanico | Araq, well I think we have less than 1000 bugs |
19:22:13 | Yardanico | because there's stuff like RFC, website issues |
19:23:57 | FromGitter | <ephja> 836 seems more optimal |
19:24:17 | Yardanico | where did you take this number from ? :D |
19:25:50 | hio | those GC numbers on the homepage are probably just from a hello world app or something |
19:26:13 | Yardanico | hio, what page are you referring to? |
19:26:19 | hio | why pretend to beat java and golang, languages who are developed by billion dollar companies who spend decades researching GCs? |
19:26:31 | hio | https://nim-lang.org/assets/img/features/gc_latency.png |
19:26:47 | Yardanico | hio, why not if it's true? :) |
19:26:53 | Yardanico | nim has no runtime VM |
19:27:45 | Yardanico | also interesting thing - these people mostly come to IRC, not to gitter |
19:29:26 | Araq | I think it's our old troll |
19:35:17 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:35:33 | FromGitter | <ephja> Yardanico: I'm sorry but the formula is proprietary |
19:35:59 | Yardanico | lol |
19:39:30 | * | haha_ quit (Quit: haha_) |
19:39:37 | Araq | oh the troll was also active on the forum again |
19:41:39 | * | haha_ joined #nim |
19:47:59 | * | claudiuinberlin joined #nim |
19:53:45 | * | mahmudov joined #nim |
19:58:17 | * | nsfw_ joined #nim |
19:58:25 | nsfw_ | hey$ |
20:01:06 | * | hio left #nim (#nim) |
20:02:03 | PMunch | Hi |
20:04:25 | nsfw_ | guys, the libcurl page in the doc is 404 - do you know the unbroken url? |
20:06:39 | Yardanico | nsfw_, maybe https://github.com/Araq/libcurl ? |
20:06:58 | Yardanico | but I may be wrong and this is not that you're looking for |
20:07:44 | dom96 | for the record, we're not pretending, the benchmarks are sourced |
20:07:48 | dom96 | You can run them yourself |
20:07:55 | Yardanico | dom96, he has already left :) |
20:08:00 | dom96 | I know |
20:08:16 | Yardanico | well he's a troll |
20:08:21 | dom96 | I think you muted him a bit too early |
20:08:33 | Yardanico | this seems to be the same person as before |
20:08:34 | dom96 | People might say that we just mute anyone that criticises us, which isn't something we want. |
20:08:40 | * | dddddd quit (Ping timeout: 240 seconds) |
20:08:57 | dom96 | this person didn't deserve to be muted IMO |
20:10:16 | PMunch | Yeah, it should be allowed to criticize. Of course if you had showed him the source and he then continue to whine about then a mute might be in place :P |
20:10:19 | * | Trustable quit (Remote host closed the connection) |
20:10:47 | dom96 | True. |
20:11:21 | Yardanico | dom96, btw, they didn't merge your PR sadly :( https://gitlab.com/gasche/gc-latency-experiment/merge_requests/16 |
20:11:50 | dom96 | They didn't merge anyone's |
20:12:01 | Yardanico | oh I see now |
20:12:06 | Yardanico | bad guys :D |
20:12:16 | Yardanico | well they actually did |
20:12:17 | Yardanico | https://gitlab.com/gasche/gc-latency-experiment/merge_requests?scope=all&utf8=%E2%9C%93&state=merged |
20:12:27 | Yardanico | ruby, php, Dlang, golang |
20:12:44 | Yardanico | and they didn't merge nim, python, erlang, frje (?), eiffel, c |
20:12:50 | * | nsfw_ quit (Ping timeout: 240 seconds) |
20:13:17 | dom96 | feel free to ping them |
20:13:55 | Araq | dom96: he PM'ed me afterwards |
20:14:03 | Yardanico | me too btw |
20:14:18 | Araq | oh interesting, troll or not? |
20:14:27 | Yardanico | he was asking how to compile dom96's "snake" |
20:14:57 | Yardanico | well I explained him how to do it |
20:15:07 | dom96 | oh, ok |
20:15:09 | dom96 | Fair |
20:15:12 | Araq | "those GC numbers on the homepage are probably just from a hello world app or something" is a troll |
20:15:48 | * | couven92 joined #nim |
20:16:05 | dom96 | yes, but not one that deserves to be muted (yet) |
20:16:08 | Araq | he can easily see it's not even our benchmark |
20:16:16 | dom96 | but if he was PM'ing multiple people then he did deserve the mute |
20:16:33 | Araq | "why pretend to beat java and golang, languages who are developed by billion dollar companies who spend decades researching GCs?" is moreso a troll |
20:19:50 | Yardanico | well maybe he can't understand the fact that nim, being a lot less popular/enterprise backed than go/java, can be actually better at some things |
20:21:27 | Yardanico | isn't that a win if people actually compare compiled language without any runtime VM with interpreted dynamically typed language? (well sometimes it's a bad thing to compare) |
20:21:44 | * | dddddd joined #nim |
20:23:28 | Yardanico | ah guys |
20:23:35 | Yardanico | hio is a known troll |
20:23:37 | Yardanico | LOL |
20:23:45 | Yardanico | just open this https://dri.freedesktop.org/~cbrill/dri-log//index.php?channel=wayland&highlight_names=&date=2017-03-03 and ctrl+f "hio" |
20:24:21 | Yardanico | well not exactly trolling |
20:24:24 | Yardanico | but strange things |
20:24:32 | Yardanico | or again - https://irclogs.jackgrigg.com/irc.freenode.net/buildbot/2015-08-03 |
20:24:37 | Yardanico | "hio why should i use buildbot instead of quickbuild?" |
20:25:27 | * | haha_ quit (Quit: haha_) |
20:25:35 | Yardanico | it's actually surprising that you can search in google by IRC nickname :) |
20:27:13 | dom96 | hah |
20:27:21 | dom96 | We need a Troll Hall of Fame |
20:28:31 | Yardanico | dom96, you wouldn't believe that google can find |
20:28:32 | Yardanico | http://www.extreme.st/jython.extreme.st/irclogs/index.php?date=2010-07-03 |
20:28:43 | Yardanico | [15:25] * dom96 (~dom96@unaffiliated/dom96) has joined #jython [15:25] * dom96 (~dom96@unaffiliated/dom96) has left #jython |
20:29:04 | dom96 | nice |
20:29:18 | mahmudov | how cna i echo Port object |
20:29:22 | dom96 | challenge for you: find the earliest mention of me in IRC logs :) |
20:29:24 | mahmudov | can* |
20:29:34 | Yardanico | mahmudov, yeah, why not? |
20:29:44 | dom96 | mahmudov: echo(port)? |
20:29:49 | dom96 | if not then try echo(port.int) |
20:29:50 | mahmudov | is it int? |
20:30:24 | mahmudov | ah dom96 |
20:30:38 | mahmudov | how it is a type? |
20:31:10 | Yardanico | dom96, http://maddogsoftware.co.uk/ |
20:31:13 | mahmudov | https://nim-lang.org/docs/nativesockets.html ? |
20:31:27 | dom96 | Yardanico: :P |
20:31:42 | mahmudov | Port isnt just a int? |
20:31:55 | dom96 | Nope |
20:32:14 | mahmudov | so i couldnt use intTostr |
20:32:26 | Yardanico | dom96, well I'm not finding you in IRC logs, but on the forums |
20:32:32 | Yardanico | from 2008-2010 |
20:33:37 | couven92 | Araq, for editDistance in unicode, is it okay if I just simply convert the strings to Rune-seqs instead... it just makes it it sooo much easier! :P |
20:33:55 | Yardanico | couven92, well I cheated the same way :D |
20:34:14 | Araq | told you it's not ok, learn how to blindly apply syntactic transformations please |
20:34:33 | Araq | your math grades will thank you. |
20:35:11 | Yardanico | dom96, I didn't program at all when I was 12! https://social.msdn.microsoft.com/Forums/en-US/76baf3de-ef61-4657-920e-2c1f0a94643c/how-do-i-make-my-program-not-minimize-any-other-programs-when-my-program-runs |
20:35:21 | couven92 | Araq, ich hab tatsächlich geschafft eine 3 im Mathe-LK im Abi zu bekommen... :( |
20:35:21 | Yardanico | (well maybe it's not you) |
20:35:42 | Yardanico | it seems you've been programming since long time |
20:35:43 | Araq | couven92: rate was ich hatte :P |
20:35:48 | Yardanico | top 5% wow |
20:36:07 | * | relax joined #nim |
20:36:08 | couven92 | okay... I juggle with it a little more... :P |
20:36:43 | Araq | len --> runeLen, s[i] --> s.runeAt(i) inc(i) --> inc(i, s.runeLenAt(i)) |
20:37:00 | Araq | these 3 rules should suffice |
20:37:01 | Yardanico | Araq, didn't work for me last time I've tried |
20:37:09 | Yardanico | I'll try again |
20:37:17 | dom96 | Yardanico: Yep. That's me. If you search for QuickScreenshot you might find what I was developing :) |
20:37:22 | couven92 | I figured that I could just save and increase an offset with each more-than-one-char Rune... but that doesn't work, since the first row is initialized with the length |
20:37:40 | couven92 | and I figures just using runeLen on the entire string would still be cheating |
20:37:53 | Araq | oh no, runeLen is allowed :P |
20:37:57 | Araq | since it doesn't allocate |
20:38:57 | couven92 | Araq, but it takes an entire additional pass through the strings! |
20:39:06 | Yardanico | couven92, :D |
20:42:54 | couven92 | Yeah, okay Araq, if I'm allowed to do runeLen, then it's really easy! |
20:42:58 | * | Yardanico quit (Remote host closed the connection) |
20:43:02 | Araq | told ya. |
20:44:02 | Araq | in fact, you can do this: |
20:44:16 | Araq | type UString = distinct string |
20:44:34 | Araq | proc len*(s: UString): int = runeLen(s) |
20:45:00 | Araq | proc `[]`*(a: UString; i: int): Rune = runeAt(a, i) |
20:45:09 | couven92 | tja... do we want a distinct unicode string type in unicode.nim? |
20:45:31 | Araq | well no, inc(i) cannot be transformed this way lol |
20:46:08 | couven92 | yeah... but fastRuneAt basically does everything I need it to do, so... |
21:06:35 | PMunch | Hmm, I'm starting to really like my Vim config now :) |
21:06:55 | * | yglukhov quit (Read error: Connection reset by peer) |
21:07:03 | PMunch | It highlights spaces and tab indentation in a non-obtrusive way which is really nice for Nim |
21:07:24 | PMunch | Something that's bugged me when writing in Vim that I couldn't always easily tell the indent level |
21:07:47 | * | yglukhov joined #nim |
21:12:22 | couven92 | PMunch, I have that as well, here's mine: https://gist.github.com/couven92/f9649c9423a2ba2d34f8d008b448ec52 |
21:12:36 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:12:53 | couven92 | I also have render whitespace in every other editor on by default... :) |
21:13:31 | PMunch | This is a bit more than render whitespace though |
21:13:41 | PMunch | It only shows the character for indent levels |
21:14:03 | PMunch | https://github.com/Yggdroot/indentLine |
21:14:11 | PMunch | That's the plugin (scroll down for images) |
21:14:41 | PMunch | And then I use a custom "set list" option to show tabs as a slightly heavier line |
21:15:16 | PMunch | http://ix.io/zxh |
21:15:19 | PMunch | That's mine |
21:15:42 | PMunch | But I've done some changes to the plugins (especially the Nim one), and made a custom colour scheme |
21:16:19 | PMunch | Brb, watching an episode of dollhouse |
21:16:25 | couven92 | hmmm... indent guides are nice, yes... We got those in VS Code some time ago, and they've also been in Visual Studio a while now iirc |
21:19:21 | FromGitter | <adamrezich> should I be using ints for array indices? |
21:20:26 | Araq | yes |
21:20:41 | FromGitter | <adamrezich> awesome |
21:23:12 | * | relax quit (Ping timeout: 260 seconds) |
21:35:43 | FromGitter | <ephja> Option[Range] |
21:35:49 | FromGitter | <ephja> oops |
21:40:30 | dom96 | So many pro-nim answers here https://www.quora.com/Which-one-is-the-easiest-to-learn-C-Rust-or-Nim?__nsrc__=4&__snid3__=737053822 :) |
21:40:38 | FromGitter | <ephja> working with ranges can be tricky: `var x: Option[range[0..b]] = some(0)` |
21:51:51 | * | yay joined #nim |
21:51:58 | * | yay quit (Remote host closed the connection) |
21:53:47 | dom96 | ooh, Nim in Action is in the "Bestselling eBooks" list. |
21:54:21 | dom96 | http://enews.manning.com/q/SEs2ELawIjIBVSu4mpuyMQnBX2kP_Uo43CvgszZ8xCOQjKxQstnmn5ugS |
21:55:18 | dom96 | Hopefully soon I'll get some more granular sales data. |
21:59:10 | * | mahsav quit (Ping timeout: 240 seconds) |
21:59:22 | * | mahmudov quit (Ping timeout: 260 seconds) |
22:00:40 | * | yglukhov quit (Remote host closed the connection) |
22:07:18 | PMunch | Nice! |
22:07:32 | * | endragor joined #nim |
22:09:06 | PMunch | And couven92 the guides are real nice for whitespace dependent languages like Nim. I've also set up a bunch of other neat plugins, like easymotion and vim-multiple-cursors |
22:09:26 | PMunch | Plus the buffer setup that allows me to have multiple files open at the same time |
22:11:45 | * | endragor quit (Ping timeout: 248 seconds) |
22:14:33 | * | Nobabs27 joined #nim |
22:19:08 | FromGitter | <Varriount> dom95 |
22:20:58 | FromGitter | <ephja> dom96's younger brother? |
22:21:44 | FromGitter | <k0pernicus> dom96.dec indeed... |
22:25:28 | dom96 | sup? |
22:38:47 | * | loc8 joined #nim |
22:39:42 | * | BigEpsilon quit (Ping timeout: 252 seconds) |
22:41:37 | * | loc8_ quit (Ping timeout: 248 seconds) |
23:05:32 | PMunch | Haha, dom96 I like your comment on my Aporia PR :P |
23:12:26 | * | thomasross quit (Ping timeout: 255 seconds) |
23:16:18 | * | PMunch quit (Quit: leaving) |
23:19:09 | TheManiac | Is there anything I can do about Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit] ? |
23:19:16 | * | couven92 quit (Ping timeout: 246 seconds) |
23:20:02 | TheManiac | I'm creating a ref object type which includes a field that contains a tuple which contains another ref ob |
23:20:07 | TheManiac | ject |
23:21:41 | * | vlad1777d quit (Quit: Leaving) |
23:22:39 | FromGitter | <k0pernicus> Nim beginner here: is it possible the compiler advertised you that the 'result' variable points to a pointer, which has not been initialized? |
23:27:08 | * | rauss quit (Read error: Connection reset by peer) |
23:28:10 | FromGitter | <ephja> there are bugs that cause false positives to be reported so I wouldn't pay too much attention to those warnings |
23:28:16 | * | rauss joined #nim |
23:34:02 | dom96 | TheManiac: show us the code |
23:34:47 | * | mwbrown quit (Quit: Exiting) |
23:38:23 | * | mwbrown joined #nim |
23:49:11 | TheManiac | https://bitbucket.org/snippets/maxgrenderjones/bRzKdp |
23:49:45 | TheManiac | Node is a ref object |
23:49:53 | TheManiac | which I'm pretty sure is the problem |
23:50:29 | TheManiac | k0pernicus: funny thing is that the warning occurs on `new(result)` |
23:53:54 | dom96 | yeah... you should be doing: result = Value(kind: vkString, stringVal: value) |
23:53:58 | dom96 | and the same for all procs |
23:54:01 | * | nsf quit (Quit: WeeChat 1.9) |