<< 21-11-2016 >>

00:01:58*ftsf_ joined #nim
00:06:07*AnonymousCoward quit (Ping timeout: 260 seconds)
00:16:54*gangstacat quit (Ping timeout: 246 seconds)
00:21:47*gangstacat joined #nim
00:28:15*yglukhov joined #nim
00:32:48*yglukhov quit (Ping timeout: 260 seconds)
00:40:50*jivank quit (Ping timeout: 256 seconds)
00:41:07*jivank joined #nim
00:45:38*chemist69 quit (Ping timeout: 258 seconds)
00:48:12*djellemah quit (Ping timeout: 256 seconds)
00:48:45*chemist69 joined #nim
00:50:48*djellemah joined #nim
01:06:51*gangstacat_ joined #nim
01:06:57*gangstacat quit (Ping timeout: 246 seconds)
01:07:04*gangstacat_ is now known as gangstacat
01:07:28*jivank quit (Ping timeout: 256 seconds)
01:07:44*jivank joined #nim
01:10:38*yglukhov joined #nim
01:15:16*yglukhov quit (Ping timeout: 260 seconds)
01:35:05*Demos joined #nim
01:38:09*Demos_ quit (Ping timeout: 258 seconds)
01:51:23*yglukhov joined #nim
01:51:29*gangstacat quit (Ping timeout: 260 seconds)
01:55:17*Sergio965 quit (Ping timeout: 248 seconds)
01:55:52*yglukhov quit (Ping timeout: 260 seconds)
01:57:09*gangstacat joined #nim
01:59:04*ibk joined #nim
02:08:00*saml_ joined #nim
02:34:09*yglukhov joined #nim
02:38:36*FreezerburnV joined #nim
02:38:48*yglukhov quit (Ping timeout: 260 seconds)
02:47:53*chemist69 quit (Ping timeout: 256 seconds)
03:01:52*chemist69 joined #nim
03:05:53*Varriount|Mobile joined #nim
03:07:25Varriount|MobileAraq: I've done some translation of the Windows header files. It looks like C2Nim is going to need some way to interpret/translate pushing pragmas
03:07:42Varriount|Mobile*packing pragmas
03:09:09*dddddd quit (Quit: Hasta otra..)
03:13:41*ekarlso_ quit (Ping timeout: 248 seconds)
03:14:03*joebo quit (Ping timeout: 250 seconds)
03:15:57*Dankrad quit (Ping timeout: 240 seconds)
03:16:31*joebo joined #nim
03:16:36*yglukhov joined #nim
03:16:52*ekarlso_ joined #nim
03:21:17*yglukhov quit (Ping timeout: 260 seconds)
03:26:53*FreezerburnV quit (Quit: FreezerburnV)
03:28:42*PMunch quit (Quit: leaving)
03:33:09*FreezerburnV joined #nim
03:46:31*FreezerburnV quit (Quit: FreezerburnV)
03:50:39*Jesin joined #nim
03:58:56*yglukhov joined #nim
04:05:08*yglukhov quit (Ping timeout: 260 seconds)
04:19:33*melike quit (Remote host closed the connection)
04:30:53*ivone quit (Remote host closed the connection)
04:31:54*clio joined #nim
04:38:06*clio quit (Remote host closed the connection)
04:38:52*vendethiel joined #nim
04:41:17*yglukhov joined #nim
04:45:44*yglukhov quit (Ping timeout: 260 seconds)
04:47:54*vendethiel quit (Ping timeout: 256 seconds)
05:02:28*Varriount|Mobile quit (Read error: Connection reset by peer)
05:06:03*saml_ quit (Remote host closed the connection)
05:09:42*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:10:54*space-wizard joined #nim
05:11:14*space-wizard quit (Client Quit)
05:11:45*space-wizard joined #nim
05:12:02*space-wizard quit (Client Quit)
05:12:32*space-wizard joined #nim
05:12:50*space-wizard quit (Client Quit)
05:13:20*space-wizard joined #nim
05:13:38*space-wizard quit (Client Quit)
05:14:09*space-wizard joined #nim
05:14:26*space-wizard quit (Client Quit)
05:14:57*space-wizard joined #nim
05:15:14*space-wizard quit (Client Quit)
05:19:25*def- quit (Quit: -)
05:23:39*yglukhov joined #nim
05:28:12*yglukhov quit (Ping timeout: 260 seconds)
05:31:25*Demos_ joined #nim
05:33:32*def- joined #nim
05:34:17*Demos quit (Ping timeout: 258 seconds)
05:41:21*Dankrad joined #nim
05:59:31*Vendan quit (Quit: ZNC - http://znc.in)
06:04:10*yglukhov joined #nim
06:08:48*yglukhov quit (Ping timeout: 260 seconds)
06:12:52*byte512 joined #nim
06:17:11*yglukhov joined #nim
06:26:00*space-wizard joined #nim
06:28:19*gokr joined #nim
06:31:08*nsf joined #nim
06:31:37*Dankrad quit (Ping timeout: 240 seconds)
06:34:57*bjz joined #nim
06:40:26*bjz quit (Read error: Connection reset by peer)
06:52:54*bjz joined #nim
07:04:42*ftsf_ quit (Quit: :q!)
07:05:08*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:08:26*yglukhov quit (Remote host closed the connection)
07:37:27*Sembei quit (Ping timeout: 256 seconds)
07:44:41*Trustable joined #nim
07:45:45*djiin quit (Remote host closed the connection)
07:46:03*djiin joined #nim
07:54:57*chemist69 quit (Ping timeout: 240 seconds)
07:59:45*chemist69 joined #nim
08:06:18*NhanH quit (Ping timeout: 245 seconds)
08:08:17*NhanH joined #nim
08:13:07*Andris_zbx joined #nim
08:27:01*yglukhov joined #nim
08:28:08*yglukhov quit (Remote host closed the connection)
08:28:21*yglukhov joined #nim
08:28:31*yglukhov quit (Remote host closed the connection)
08:29:04*yglukhov joined #nim
08:39:51*LeNsTR is now known as lenstr
08:58:23*brechtm joined #nim
08:58:53*nicanaca0 quit (Remote host closed the connection)
09:02:46*nicanaca0 joined #nim
09:30:01*Arrrr joined #nim
09:30:54*Arrrr quit (Client Quit)
09:31:50*Arrrr joined #nim
09:43:40*Sembei joined #nim
09:52:55*ebarrett quit (Remote host closed the connection)
09:52:56Calinoudom96: oh, I've been thinking, I need to port the complete Nim feature list (that's on current website homepage, nim-lang.org) to the Jekyll prototype
09:53:12Calinou(to a dedicated Features page for example, or a page that's linked from Examples)
09:53:27Calinounot hard, maybe it can be shortened a bit, but I personally like such feature lists
10:03:06*chemist69 quit (Ping timeout: 250 seconds)
10:05:35*chemist69 joined #nim
10:07:13*Demos_ quit (Ping timeout: 258 seconds)
10:09:03*couven92 joined #nim
10:19:15yglukhovIs there some static_for macro to "iterate" over compile-time something and in the end produces its body repeatedly but parametrized with counter?
10:20:55cheatfateendragor: it looks like old asyncdispatch is pretty good with sequence of asyncCheck send() too...
10:26:03FromGitter<endragor> @cheatfate you mean before the fix? the problem may not occur every time you make multiple sends. but it may occur in case of app slowness or some other condition. There is no guarantee that the second send() will always return EAGAIN, because OS had time to do something between two calls. If you do 3 sends to the same socket, the results of syscalls can be: ⏎ ⏎ 1) EAGAIN ⏎ 2) OK ⏎ 3) EAGAIN
10:26:03FromGitter... [https://gitter.im/nim-lang/Nim?at=5832cbbbb7cf637f2ac8e5dc]
10:27:42FromGitter<endragor> to simulate this you can insert some long for loop or a sleep into one of the send() callbacks, that should make it more likely to happen.
10:28:17*enthus1ast joined #nim
10:28:49FromGitter<cheatfate> @endragor nope, i'm talking about order of asyncCheck sends in output stream of data
10:29:01FromGitter<endragor> yes, that's what I'm talking about, too
10:29:29FromGitter<endragor> are you talking about the situation *before* or *after* the fix from @dom96?
10:29:56FromGitter<cheatfate> i'm talking about not fixed asyncdispatch
10:30:37FromGitter<cheatfate> because i have made test which makes many asyncCheck send calls (about 100)
10:30:44FromGitter<cheatfate> and all of them properly send data
10:30:48FromGitter<cheatfate> in right order
10:31:22FromGitter<cheatfate> i have tried small chunks of 128 bytes and bigger chunks about 128kb
10:31:44FromGitter<endragor> yeah, so what I'm saying is that not fixed asyncdispatch will keep proper order for `asyncCheck send()` most of the time. But rarely it may happen that the order is broken. Above I explained the scenario. ⏎ Yeah, a test that simply makes bunch of send() calls will not make it occur
10:33:55FromGitter<cheatfate> but not fixed asyncdispatch must complete all sequenced `asyncCheck send()` after first write event, am i wrong?
10:35:30FromGitter<endragor> I'm not sure what you mean by saying it "must complete all sequenced sends". it must invoke the first one for sure
10:40:11*zielmicha[m] joined #nim
10:41:12FromGitter<cheatfate> ```code paste, see link``` ⏎ ⏎ this is part of `poll()` and if `EvWrite` event happens and many callbacks stored inside of `data.writeCBs`, then all of them will be called after first incoming `EvWrite` event. So many `send(3)` syscalls will be made without waiting for appropriate `EvWrite`, agree? [https://gitter.im/nim-lang/Nim?at=5832cf47b7cf637f2ac8f96a]
10:41:42*Varriount|Mobile joined #nim
10:42:17Varriount|MobileAraq: https://github.com/Varriount/Win2Nim
10:43:18Varriount|MobileThat script does a fairly good job of performing batch modifications on the Windows SDK files
10:44:27Varriount|MobileThere's still a number of additions that need to be made, but the basic framework is there.
10:44:38*chemist69 quit (Ping timeout: 245 seconds)
10:45:52*elrood joined #nim
10:50:32FromGitter<endragor> @cheatfate yes, and that's the problem.
10:52:57cheatfateendragor, but for some reason all my tests on `not fixed` asyncdispatch working good
10:53:31AraqVarriount|Mobile: thanks
10:53:43*prose[m] joined #nim
10:53:43*hohlerde joined #nim
10:53:43*MrAxilus[m] joined #nim
10:53:43*M-Quora joined #nim
10:53:44*jivank[m] joined #nim
10:53:50*terry[m] joined #nim
10:53:51*erwana[m] joined #nim
10:53:51*TheManiac joined #nim
10:53:51*Guest73656[m] joined #nim
10:54:15*dmi0 quit (Ping timeout: 246 seconds)
10:56:42FromGitter<endragor> @cheatfate because it's not a problem that's easy to track with tests. I explained the scenario where it may happen. Insert sleep() or CPU-burning code (some long `for` loops) into send() callback and you may be able to see it in tests. ⏎ The thing is - asyncdispatch was using an assumption that if one send() returned EAGAIN or partially consumed data, then the second send() will always return EAGAIN. But there is no such guarantee.
10:56:42FromGitter... Anything may happen between two (or more) send() calls.
10:58:37*chemist69 joined #nim
11:07:10cheatfatei'm thinking to change send socket buffer size
11:14:00*Arrrr quit (Ping timeout: 260 seconds)
11:20:52cheatfateendragor: but anyway, less syscalls is always better
11:21:14cheatfateendragor: do you have made any tests on Windows?
11:22:00FromGitter<endragor> no
11:26:44*Arrrr joined #nim
11:29:20*arnetheduck joined #nim
11:48:06*dmi0 joined #nim
11:56:01*planhths joined #nim
12:05:00*planhths quit (Remote host closed the connection)
12:05:25*planhths joined #nim
12:08:04*brechtm_ joined #nim
12:09:05*planhths quit (Client Quit)
12:09:45Araqhmm we need a toString that takes a 'var string' to append to for speed
12:10:22Araqshould we name it '$' or $-> or toString?
12:10:34Araq345 $-> resultBuffer
12:11:36*brechtm quit (Ping timeout: 246 seconds)
12:11:45Araqany opinions?
12:12:36Araqor maybe resultBuffer &=$ 234
12:12:55*planhths joined #nim
12:15:53gokrIn Smalltalk such patterns often use the ... blablaOn: naming style. Like "streamOn:" or "printOn:" - though the argument is meant to be a stream, but almost the same I guess.
12:16:20gokr"$->" looks a bit... convoluted.
12:18:35flyxI think `$` is fine as infix, myString $ someValue
12:19:06flyxor maybe we can just overload `&` ?
12:23:16Arrrri'd choose toString, it won't be too popular anyway
12:25:35Arrrrwhat's the problem with add?
12:27:56AraqArrrr: there is no problem, just a minor fear that 'add' weakens the type checking too much
12:28:15Araqstr.add(someInt) # hmm
12:29:33AraqI think I prefer x &=$ y which is just x &= $y but faster :-)
12:29:49flyxI think `&` standing for concatenation would be reasonable. what else would be the concatenation of a string and an int if not the int's representation concatenated to the string
12:30:27Araqflyx: '&' yields a string though, '&=' yields void
12:30:40Araqand the new operation would yield void too
12:30:41flyxah yes
12:30:47gokr"x &=$ y" ... oh my. ;)
12:31:14Araqgokr: problem is that &=$ gets the wrong precedence
12:31:25Araq&$= would get the proper precedence ...
12:31:54flyxwhat about overloading &=
12:31:59Araqand at this point we shorten &$= to &= which is the universal alias for 'add'
12:32:12Araqso let's overload 'add'
12:40:07elroodseems like this should be a reasonably easy and simple optimization on some intermediate representation level, wouldn't it? does your special casing really generate a benefit compared to buf &= $foo ?
12:46:30Araqyou can optimize &= $ to &=$ with a TR macro but that still means you need the &=$ as a primitive available
12:47:03Araqthese primitives cannot be produced by inlining and specialization with today's compiler technology
12:47:42Araqor at least I can not envision how it would work, the transformation is not trivial
12:50:53*dmi0 quit (Ping timeout: 260 seconds)
12:52:16*lenstr quit (Excess Flood)
12:53:06*LeNsTR joined #nim
12:57:44*djiin quit (Ping timeout: 250 seconds)
13:02:31elroodhm, i'm curious how your code and the generated ir and assembly are going to look like then, would've thought this was merely about saving some allocations and copying, but i'm probably missing something important then
13:05:36flyx`$` is a procedure, so that optimization would be interprocedural. *even if* it could be implemented, compiler usually stay on intraprocedural level for optimization.
13:10:05elroodi am not convinced that's been true for any reasonably sophisticated compiler implementation at least since the mid-90s. inlining and specialization on datatypes isn't that esoteric and rare
13:10:49*brechtm_ quit (Remote host closed the connection)
13:11:55*brechtm joined #nim
13:17:58*Arrrr quit (Ping timeout: 245 seconds)
13:18:45flyxI would guess that a `$` implementation's IR is typically too complex for a compiler to consider it for inlining, but I may be wrong
13:25:48elroodi might be wrong just as well. we'd probably have to look at the generated code to get an idea of what's really happening and possible
13:27:21flyxassuming someone does some strange or clever stuff in `$`, I also don't think an algorithm can correctly transform it
13:27:52*couven92 quit (Read error: Connection reset by peer)
13:28:19flyxlet's look at some arbitrary example I just invented: https://gist.github.com/flyx/1b55d79b94ef9aec07e519f234abd948
13:28:57flyxdo you think the compiler can transform the generated code of this so that it appends to an existing string?
13:30:16flyxit would need some complex knowledge about what happens here to do that. I don't think current analysis methods in compilers can provide that
13:38:03*chemist69 quit (Ping timeout: 258 seconds)
13:40:04elroodfrankly, i don't see a problem. your function is pure, easily inlineable, operates on a fixed range of integer inputs, returns a 4-char string.. could you rephrase the question?
13:41:13elroodthe practical solution would be to let your compiler do its work and see, though. a human's opinion is only so useful in this regard
13:42:47*planhths quit (Ping timeout: 260 seconds)
13:43:08Araqelrood: look at my patch and see for yourself.
13:43:23Araqit changes semantics from "return and append" to "append inplace"
13:44:03flyxelrood: assume the proc will be inlined. the originally generated IR consists of allocating a string on the heap and doing some operations on it, the ultimately returning a pointer to it [together with some dope]. so you think a compiler would be able to rewrite the algorithm to append to another string instead?
13:44:59Araqit implies changing the indexing from result[i] to result[i+base] where 'let base = result.len' (aka consider the existing length)
13:45:30AraqI claim that no compiler will do this heavy rewrite as an optimization.
13:45:42*flyx supports that claim
13:46:39elroodflyx, i'd think it should, yes, but as said, my opinion is not very useful here. we should see what our compilers of choice come up with
13:46:55elroodwill have a look later, thanks, Araq
13:47:08flyxthe compiler would need to generate code to possibly expand the existing string dependent on its capacity. so, it would need to generate implicit allocation code.
13:47:15elroodbbl
13:56:06*chemist69 joined #nim
14:14:34FromGitter<gogolxdong> How to let cpu execute machine code directly?Do you have some material to recommend?
14:19:07cheatfategogolxdong: what does it mean directly?
14:23:24*arnetheduck quit (Ping timeout: 260 seconds)
14:24:11FromGitter<gogolxdong> I have a group of machine code corresponding to their assembly codes ,input these codes onto bare-metal and let cpu execute them.
14:25:56FromGitter<gogolxdong> such as let screen show hello world with colors and twinkle.
14:27:31cheatfategogolxdong: abstract algorithm will looks like, allocate some memory, copy your machine code to memory, transfer code execution to that memory via, `jmp`, `call`, `ret` or any other target platform specific instruction
14:28:30cheatfatealso you need to make `comeback` to your code, via `ret`, `jmp` or any other target platform specific instruction
14:29:52cheatfatebut between allocate and copy there can be some kind of tricks which depends on target platform, for x86 memory page must be marked to have execution flags
14:31:44cheatfatealso bare-metal have some kind of `bootloader`
14:32:07cheatfatewhich after doing some initialization procedures transfers code execution to some know specific address
14:32:38cheatfateand your machine codes must be placed in memory at this address, so `bootloader` will transfer execution to your code
14:34:12FromGitter<gogolxdong> This is a legacy issue which many modern advanced language compiled to c, then compiled to assembly , then compiled to machine code , then let cpu execute via what you describe above. I am conceiving a possibility to be compiled to machine code and make cpu execute directly without system.
14:35:37*PMunch joined #nim
14:37:21cheatfategogolxdong: `system`, you mean operation system?
14:37:31FromGitter<gogolxdong> yes
14:37:51cheatfategogolxdong: what type of cpu?
14:38:01FromGitter<gogolxdong> x86
14:38:33FromGitter<gogolxdong> and arm,compatible
14:41:11cheatfategogolxdong: http://zoo.cs.yale.edu/classes/cs422/2010/lec/l3-hw
14:43:45FromGitter<gogolxdong> Is this your homework?
14:45:07cheatfategogolxdong: this was just proper `google` request, is it helps?
14:45:50FromGitter<gogolxdong> LUX ET VERITAS is Yale motto
14:46:06FromGitter<gogolxdong> yes, marked
14:47:12*planhths joined #nim
14:57:16*Senketsu joined #nim
14:57:45*jackv quit (Quit: ZNC - 1.6.0 - http://znc.in)
15:00:44*LeNsTR quit (Changing host)
15:00:44*LeNsTR joined #nim
15:06:21*jackv joined #nim
15:09:06*FreezerburnV joined #nim
15:12:50*FreezerburnV quit (Client Quit)
15:15:00*FreezerburnV joined #nim
15:21:33*chemist69 quit (Ping timeout: 256 seconds)
15:24:16*[CBR]Unspoken quit (Ping timeout: 256 seconds)
15:25:26*[CBR]Unspoken joined #nim
15:26:57*pregressive joined #nim
15:27:23*chemist69 joined #nim
15:39:03*Gonzih quit (Read error: Connection reset by peer)
15:41:41*PMunch quit (Quit: leaving)
16:07:20*planhths quit (Remote host closed the connection)
16:07:49*planhths joined #nim
16:26:51*FreezerburnV quit (Quit: FreezerburnV)
16:43:48*couven92 joined #nim
16:48:47*FreezerburnV joined #nim
16:49:49*FreezerburnV quit (Client Quit)
16:50:12*FreezerburnV joined #nim
16:59:46*Andris_zbx quit (Remote host closed the connection)
17:07:44*planhths quit (Ping timeout: 258 seconds)
17:09:38*chemist69 quit (Ping timeout: 245 seconds)
17:11:17*Varriount|Mobile quit (Ping timeout: 260 seconds)
17:24:22*FreezerburnV quit (Quit: FreezerburnV)
17:27:50Calinouhmm, Crystal site changed a bit: https://crystal-lang.org/
17:27:59*chemist69 joined #nim
17:35:51Calinouhow is the Gitbook effort for Nim going by the way?
17:36:13CalinouI remember someone was working on porting/creating Nim documentation in a GitBook, which offers a nice interface for reading, already used by Rust and Crystal
17:40:04dom96Their sponsors are front and center
17:40:06dom96we need that too
17:40:22dom96Like I said, the front page should show panels with various highlights
17:40:34dom96similar to how the top sponsors are presented on the crystal site
17:43:35*space-wizard joined #nim
17:45:05dom96As a side note: I think we will need to consider moving away from bountysource
17:45:16dom96The site is run by volunteers and has become incredibly unstable.
17:45:38*yglukhov_ joined #nim
17:45:52dom96Oh, this appears to be the reason "<spunky> [23:53:44] Cofounder had a baby, skeleton staff atm"
17:49:20*yglukhov quit (Ping timeout: 256 seconds)
17:50:14*yglukhov_ quit (Ping timeout: 265 seconds)
17:50:47*Salewski joined #nim
17:52:41SalewskiDom, in my editor I have for each socket.connect() a newSocket() just before: https://github.com/ngtk3/NEd/blob/master/ned.nim#L1359
17:53:26SalewskiIs that good practice? Or may it be better to resue the same socket, so move newSocket at start of the proc?
17:54:34*yglukhov joined #nim
17:56:46dom96Salewski: It's necessary. You can't reuse sockets.
17:57:11SalewskiOK, thanks.
17:57:45*Varriount|Mobile joined #nim
17:57:51*Varriount|Mobile quit (Read error: Connection reset by peer)
17:58:41*Varriount|Mobile joined #nim
17:59:05*yglukhov quit (Ping timeout: 256 seconds)
17:59:06*Varriount|Mobile quit (Read error: Connection reset by peer)
17:59:26*Varriount|Mobile joined #nim
17:59:27*Varriount|Mobile quit (Read error: Connection reset by peer)
18:01:03*Varriount|Mobile joined #nim
18:01:42*kulelu88 joined #nim
18:01:43*gokr quit (Ping timeout: 268 seconds)
18:02:36*Varriount|Phone joined #nim
18:02:38*Varriount|Mobile quit (Read error: Connection reset by peer)
18:05:37*Varriount|Phone quit (Read error: Connection reset by peer)
18:05:43*[ui] joined #nim
18:05:56*Varriount|Phone joined #nim
18:05:56dom96Salewski: Why are you putting so much code in a single file?
18:06:21dom96You should honestly consider refactoring it into multiple modules, and also splitting the functions up a bit too
18:08:08SalewskiDom, I see no real benefit in splitting it into modules currently, and even have no real idea what part I may split.
18:08:31SalewskiI may indeed refactor some functions.
18:09:40SalewskiFor your info, I think I found the reason for random gtk related crashes: It is that GTK is not thread save, and I did not care enough.
18:10:11*gangstacat quit (Quit: Ĝis)
18:10:23SalewskiI think I fixed that, no chrashes for a few hours...
18:11:41SalewskiUnfortunately nimsuggest can still crash in very rare situations, but I have already submitted minimal examples for that crashes, so I hope Araq will fix that soon...
18:18:12*byte512 quit (Ping timeout: 260 seconds)
18:18:25*Sembei quit (Ping timeout: 244 seconds)
18:18:30*ibk quit (Quit: Connection closed for inactivity)
18:19:03*Dankrad joined #nim
18:19:21*gangstacat joined #nim
18:29:20SalewskiDoes Google search for IRC logs works releable? Yesterday I forgott gcc option to save assembler listing, it is "save-temps" from http://irclogs.nim-lang.org/02-11-2016.html
18:30:20SalewskiBut google search "site:irclogs.nim-lang.org searchterm" seems to ignore many terms.
18:30:27*yglukhov joined #nim
18:32:36*brson joined #nim
18:34:00*gokr joined #nim
18:34:30*yglukhov quit (Ping timeout: 246 seconds)
18:36:44*Salewski quit (Quit: Salewski)
18:36:54*Salewski joined #nim
18:42:45*gokr quit (Ping timeout: 248 seconds)
18:44:58*gokr joined #nim
18:46:19*Gonzih joined #nim
18:55:29*Dankrad quit (Ping timeout: 265 seconds)
19:02:30*vendethiel joined #nim
19:02:30*Varriount|Phone quit (Read error: Connection reset by peer)
19:02:40*Varriount|Phone joined #nim
19:04:49*yglukhov joined #nim
19:05:06*Dankrad joined #nim
19:08:25*brechtm quit (Ping timeout: 260 seconds)
19:09:21*enthus1ast quit (Ping timeout: 256 seconds)
19:24:58*Ven_ joined #nim
19:32:38*Varriount|Phone quit (Read error: Connection reset by peer)
19:32:51*Salewski left #nim (#nim)
19:40:55Calinoudom96: ok, good to note for the site (sponsors centered)
19:47:10*Varriount|Phone joined #nim
19:49:48*Varriount|Phone quit (Read error: Connection reset by peer)
19:51:42*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:51:56*libman joined #nim
19:53:13*PMunch joined #nim
20:01:13*pregressive quit ()
20:03:07*Sembei joined #nim
20:04:53*Pisuke quit (Ping timeout: 256 seconds)
20:10:26*gokr quit (Ping timeout: 256 seconds)
20:11:27*[ui] quit (Quit: Connection closed for inactivity)
20:27:15*cheatfate quit (Ping timeout: 268 seconds)
20:31:16Calinouhmm, on Windows, the 0.15.2 64-bit .zip is not able to detect my 64-bit MinGW-w64
20:31:18Calinou(version 6.2.0)
20:31:25Calinoucan I specify its path manually?
20:36:43AraqCalinou: I don't think so, but all finish.exe is does is to patch your nim.cfg anyway
20:36:50Calinouah
20:38:02*planhths joined #nim
20:43:03*planhths quit (Remote host closed the connection)
20:43:36*planhths joined #nim
20:44:35*planhths quit (Client Quit)
20:46:46*Varriount|Phone joined #nim
20:48:52*planhths joined #nim
20:52:42*gokr joined #nim
20:56:38*dddddd joined #nim
20:56:47kulelu88Araq: how you do feel about OOP?
21:02:24*couven92 quit (Quit: Client disconnecting)
21:02:35Araqpretty much the same way I feel about FP. When performance is a concern, it's a liability.
21:03:08libmannim's license freedom score went from 88.918% (345 of 388 packages have license fitting copyfree.org definition) on Oct 31 to 88.491% (346 of 391) just now. I for one blame Global Warming. :P
21:04:19libmanHow much of my license nagging is the Nim community willing to tolerate? Because I can be a lot more annoying if I tried harder. ;)
21:05:04kulelu88libman: you can annoy as much as you like, but asking the limited community on IRC to bully 3rd-party devs to unlicense their code will just shrink the community
21:06:27kulelu88Araq: have you written python code that was OOP or procedural? (in the past)
21:07:09libmanI definitely want to avoid anything that might "shrink the community". I'm hoping being the most "don't worry about the legal crap" language ecosystem would be a positive point for Nim.
21:07:46kulelu88depriving people of using the GPL cause it exists, doesn't make much sense
21:07:55*planhths quit (Ping timeout: 265 seconds)
21:08:17Araqkulelu88: procedural code until I noticed Python's scoping rules are severely lacking for procedural, so I switched to packing stuff into a 'class'
21:08:25libmankulelu88: Please clarify your last statement.
21:08:26Araqvery roughly speaking.
21:09:22Araqlibman: I improved performance of JSON generation today. dig out some benchmark and take a look.
21:09:24*Demos joined #nim
21:09:28kulelu88libman: does the GPL violate the copyfree.org definition ?
21:09:39libmanAraq: yaaay! :D
21:09:57libmankulelu88: GPL is like the #1 worst offender.
21:10:17Araqthat's more productive than arguing about Stallman being an Andrew Ryan
21:10:35libmanI think Nim's approach to OOP (especially UFCS) is ideal.
21:10:47kulelu88Araq: you should drop by in #gnu if you don't want to do any work for a day
21:12:19libman"I chose language X because it comes with the greatest quantity and diversity of legalese in its library ecosystem" - said no one ever.
21:12:20kulelu88I tried convincing libman to return to civil society and become an internet millionaire but he chose not to :P
21:13:57libmanMy choice of Nim vs Go has become an epic philosophical crusade. I'll write about that later.
21:14:42Araq"I chose Nim because I'm not a sheep, nor an ape."
21:15:18Araq(^ don't take this too seriously)
21:15:34libmanFor me this is like marriage, but without no-fault divorce. I'd hate to become Internet's #1 Nim advocate only to be banished for my license nagging...
21:16:11ldleworkWell you should certainly start writing articles rather than nagging.
21:16:14ldleworkin realtime
21:16:19kulelu88I find it odd that the Nim community isn't as big as it *could* be, considering how it always get great exposure on Hacker News (and possibly reddit too)
21:16:31libmanldlework: you are absolutely right about that.
21:16:39ldleworkkulelu88: its kinda unstable right?
21:17:19kulelu88Unless HN really is just noise and "flavour of the moment"
21:17:19*Matthias247 joined #nim
21:18:04kulelu88has there been a "killer app" written in Nim yet? The Kubernetes kind ?
21:18:22libmanI have a couple of killer apps in mind. ;)
21:18:35dom96kulelu88: if there was one you'd know about it :)
21:19:19libmanI hope dom96 and Araq will weigh in on Nim community's policy toward licenses and license nagging.
21:19:53kulelu88libman: in order to continue nagging on licenses, I think we need to issue a code of conduct that is GPL
21:20:06kulelu88no GPL is too soft. AGPL
21:20:13libmanAs far as I'm concerned, `nimble`s recommendation of MIT license is a huge benefit for Nim.
21:20:49dom96libman: I would love to improve Nimble so that it is more aware of the different licenses out there.
21:21:11Araqlibman: yeah good point, but I think that's exactly how much we should enforce this issue. A nice default for Nimble.
21:21:15dom96This doesn't mean that it should quit with an "GPL sucks" error when people pick GPL
21:21:16kulelu88dom96: when you get accepted into Y Combinator, will your startup use Nim ?
21:21:37dom96But something impartial that provides more information about each license would be super nice
21:21:45*Demos_ joined #nim
21:21:52dom96(If you want to add something like that to `nimble init` then please do so :))
21:22:02kulelu88dom96: I'd avoid doing that. don't 'guide' people to a license. Let them decide
21:22:04libmandom96: I have a license detection tool in Nim that I'm in the process of refactoring. I'll get back to you on that.
21:22:40dom96kulelu88: Avoid what? Giving more info about licenses in Nimble?
21:22:52dom96I wouldn't consider that "guiding"
21:23:09libmanIf I wrote `nimble init`, it would contain much code to electroshock people who choose restrictive licenses on compatible Samsung laptops. ;)
21:23:15kulelu88dom96: I've never heard of a package manager providing license info before
21:23:50dom96Perhaps I'm not making myself clear.
21:23:58dom96I'm not entirely sure if my idea would work in a CLI app
21:24:07Calinoua "nimble license" command would be nice, it would tell you the license of a package (or your dependencies if you're in a project)
21:24:11*Demos quit (Ping timeout: 258 seconds)
21:24:13Calinou(maybe that exists already)
21:24:16dom96But I'm thinking that `nimble init` should give you a choice of licenses with a short description of each
21:24:17CalinouI believe eg. Symfony has that
21:24:34dom96or maybe some sort of ASCII table that compares them :)
21:24:39libmanOf the package ecosystems I've analyzed, after Nim, Haskell does the second best job with package license metadata. Ruby, Node, FreeBSD ports are all very haphazard.
21:26:15Calinouis there a simpler syntax for creating arrays? http://nim-lang.org/docs/tut1.html#advanced-types-arrays
21:26:25kulelu88dom96: when you get accepted into Y Combinator, will your startup use Nim ?
21:27:20dom96kulelu88: hah, where did that question come from?
21:27:30dom96Are you expecting me to be accepted into YC?
21:27:31libmanMy `lice` tool (currently broken) detects pretty well from among 757 license types scraped from Gentoo Portage. The goal is to have one command that tells you all your "legal obligations" for all dependencies (including base OS components, ports, and language libraries).
21:27:38kulelu88I asked it above, but you probably missed it
21:27:45dom96Yeah, I did, sorry.
21:27:53dom96Good that you repeated it
21:28:14kulelu88I hope you are dom96 .
21:28:24dom96Anyway, answer is: of course.
21:28:43kulelu88Unless you dream of working in a silo job for X-bank improving their Java backend
21:29:20dom96Yeah... don't want that.
21:29:39dom96I think I will try my hand at working freelance
21:29:43dom96or remotely somewhere
21:29:46dom96That would be nice.
21:30:30dom96Of course, a startup would be nice too and I do consider it my ultimate goal.
21:30:30libmanHow about this deal: Nim has an "official recommendation" for using Copyfree licenses in all libraries (like two spaces instead of tabs), and have `nimble` issue a one-line warning about uncopyfree licenses (I'll provide the code).
21:31:03kulelu88yeah, no that won't work libman
21:31:41dom96libman: I would prefer for Nim and Nimble to remain neutral on this manner.
21:32:00dom96It's better to educate people and let them come to their own conclusion.
21:32:39dom96In addition, creating such a recommendation might prove a bit too divisive.
21:33:04Calinouso I don't understand http://nim-lang.org/docs/tut1.html#advanced-types-arrays because it sounds inflexible to me
21:33:11Calinouit tells me to create a IntArray type for eg. a array with 10 slots
21:33:17kulelu88getting into code politics is the last thing a smaller language community needs
21:33:24Calinouwhat if I want an array with 15 slots later in the program? do I need to create another type? how am I going to call it?
21:34:34dom96Calinou: Yes, a dynamic array is called a sequence in Nim: seq[string]
21:34:36*Demos joined #nim
21:34:48CalinouI saw that
21:35:21dom96kulelu88: indeed
21:37:21kulelu88dom96: are you guys keeping track of nim in production?
21:37:33*Demos_ quit (Ping timeout: 268 seconds)
21:37:58dom96not really.
21:38:09Calinouhmm, Nim on Windows compiles my program but fails to link it, "Access denied"
21:38:53*Kingsquee joined #nim
21:39:47libmanHow about saying something like: "Hint: Nim and 79% of nimble packages use the MIT license. Please consider this for your libraries to keep things as simple as possible for everyone."
21:40:39*nsf quit (Quit: WeeChat 1.6)
21:40:41*ryanhowe joined #nim
21:42:24kulelu88libman: I don't know if you're joking or not, but pushing the copyfree agenda here is no different to Richard Stallman popping by and saying "please use the GPL"
21:43:02*xet7 quit (Quit: Leaving)
21:44:40libmanThe difference would be who makes a persuasive argument why it would be to Nim's benefit to get the licensing culture right from the beginning.
21:44:41*Varriount|Phone quit (Read error: Connection reset by peer)
21:44:54*Varriount|Phone joined #nim
21:47:20kulelu88libman: I am trying to understand your motives here. By 'forcing' people through subtle means to adopt 'copyfree' licensing, aren't you depriving them of the very freedom you want them to be liberated into?
21:47:31libmanMany languages (ex Ruby, Mono) had to change licenses, and it wasn't pretty. A minute of time spent dealing with legalese is a minute not spent coding.
21:48:02*xet7 joined #nim
21:48:23dom96libman: Tell you what. If you can get Armin Ronacher (who's a copyfree proponent IIRC) to become a Nim developer (this means he begins writing projects in Nim and writes at least one blog post about why Nim is awesome) then I will add that to Nimble :P
21:49:07kulelu88that sounds like a rough deal for you dom96
21:50:18dom96lol
21:50:20libmankulelu88: I am very specific about terminology, and there's no "forcing" here. People should be free to use Nim with a "Earth Is Flat, Jews Have Tails, Heil Hitler" license (contrary to laws in some countries) - free speech.
21:50:53def-Calinou: sounds like a permissions problem for that directory and the user compiling
21:51:03kulelu88you are forcing them though. RE: "Hint: Nim and 79% of nimble packages use the MIT license. Please consider this for your libraries to keep things as simple as possible for everyone."
21:51:25kulelu88"please consider this"
21:51:29libmanThe word you're looking for is "nudging" - https://en.wikipedia.org/wiki/Nudge_theory
21:52:35Calinoudef-: going to run Nim in WSL for now... it works there
21:52:52libmanA lot less "force"ful than the "no tabulators" rule (which made me switch to the other side of that Holy War after 20 years).
21:53:48AraqError: unhandled exception: An attempt was made to complete a Future more than once.
21:53:58Araq^ what's that about?
21:54:04kulelu88libman: if you wrote more code to improve the compiler than code that checks if licensing is correct, do you think that your efforts may become more valued ?
21:54:20libmandom96: I can only promise to increase my efforts at promoting Nim. I cannot promise changing a specific person's mind.
21:54:20dom96Araq: future.complete() # ok; future.complete() # You're doing something wrong, future is already completed.
21:55:15Varriount|PhoneCalinou: You get a permissions error if the executable file is locked (such as if it is currently running)
21:55:34CalinouI can't see why it would be running... I installed that MinGW long time ago
21:55:47dom96Calinou: Can you gist the output?
21:56:03*ryanhowe quit (Quit: WeeChat 1.4)
21:57:04Varriount|PhoneCalinou: When you got the error, were you *re*compiling a program?
21:57:45Calinouhttps://gist.github.com/Calinou/47fb6c3db6b21025ad8845216db75d2b
21:57:51libmankulelu88: it's not like I've been "cheating on Nim" with another language (unless shell script counts, LOL). I was just going through a phase where I wasn't coding at all, and now I'm about to start some "killer app" projects.
21:57:51CalinouVarriount|Phone: yes, but deleting nimcache does not solve it
21:58:18kulelu88libman: like a 'killer' http lib?
21:58:25Varriount|PhoneO_o
21:59:03libman"Where we're going, we don't need roads."
21:59:55Varriount|PhoneCalinou: That's odd... I would expect "Access Denied", not "Refused"
22:00:10CalinouVarriount|Phone: in French it just means "Access denied"
22:00:28Varriount|PhoneAh, you're translating?
22:00:42dom96Calinou: And it compiled successfully once already?
22:00:51elroodCalinou, have you checked whether there is a main.exe in your directory already and if you can delete that file manually?
22:01:02dom96what happens when you run `nim c -o:foo.exe main.nim`?
22:01:31Calinoudom96: nope, never
22:01:50Varriount|Phoneelrood: The Nim compiler isn't able to write out all the C files
22:01:52Calinousame error with that command, fails at linking
22:02:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:02:13Calinouit never writes out that .exe by the way
22:02:16Varriount|PhoneOr it can't execute the compiler
22:02:16Araqdom96: "Stack trace to moment of secondary completion:" is mostly all within nim's stdlib
22:03:30elroodVarriount|Phone, are you sure? doesn't look like it to me, wouldn't the error pop up before the linking step then?
22:03:45Varriount|PhoneCalinou: Can you give us the output with the verbosity option turned up?
22:05:39Calinouhttps://gist.github.com/Calinou/ac03a17b19c42dca895d302ac489377e
22:05:53Calinouso yeah, my MinGW path might not be great, it contains a space
22:06:41dom96Araq: want me to take a look? gist it
22:09:46Varriount|PhoneCalinou: Hm
22:10:50Varriount|PhoneIt's not GCC's linker, because the Nim compiler is the thing throwing the error.
22:11:11Varriount|PhoneAt least, If I recall correctly
22:11:37Calinouthis is latest Nim 0.15.2, 64-bit, on Windows 10 AU
22:11:47Calinouthe MinGW is also 64-bit
22:11:59CalinouI'd try Clang but Clang on Windows kinda looks messy
22:13:02Varriount|PhoneCalinou: Could you check the permissions on the various directories to make sure you have write access?
22:13:29Varriount|PhoneAlso, what happens if you try this with an administrator command prompt?
22:14:24Calinoujust tried with administrator command prompt
22:14:32CalinouI get some GUI telling me that libwinpthread-1.dll couldn't be found, twice
22:14:42Calinouthose appear just before the linking step
22:15:05CalinouI guess I'll try another MinGW installation, which one do you recommend that's 64-bit and relatively recent? MSYS2?
22:15:15Varriount|PhoneThat might work
22:15:21Araqjust use the one we ship with Nim
22:15:35Araqhttp://nim-lang.org/download/mingw64.zip
22:16:10Calinouah, good
22:16:32Araqdom96: seems to be caused by this:
22:16:35Araq if future.failed:
22:16:35Araq resultFut.fail(future.readError())
22:16:40elroodAraq, not seeing a lot of an improvement for your string.add performance patch to be honest, looks like it mainly shifts the work from allocating memory for a new string to allocating memory for growing an existing one here. perhaps the situation is different for unoptimized builds or the js backend though. if it works beneficially for you, great
22:17:21CalinouAraq: it works, thanks
22:17:44Araqelrood: well I did no benchmarks, but if the buffer is already longish it likely has enough space for the tiny stuff that's appended
22:18:04Araqsaving GC runs
22:18:07elroodyeah, in that case it's an improvement for sure
22:18:13dom96Araq: I doubt it
22:18:19dom96Araq: Can I see the stack trace?
22:19:17*Trustable quit (Remote host closed the connection)
22:19:55CalinouAraq: what about bundling MinGW in the new .zips?
22:19:56Araqdom96: https://gist.github.com/Araq/33711e0bd25fe59bcf00f79581b5af2e
22:20:04Calinouso that it's already in dist/mingw, and with nim.cfg set accordingly
22:20:40AraqCalinou: the idea is that you update Nim more frequently than mingw and share mingw installations and bandwidth
22:21:10dom96Calinou: You can use the installer, it will install MinGW as well for you.
22:21:18elroodCalinou, besides, unless mingw has dramatically reduced in size in the last years, that'd blow up the zip unproportionally
22:21:45Araqelrood: we actually have a "minimal" mingw ...
22:21:59Araqwe trimmed it down by a hacky tool
22:22:01*Sentreen quit (Ping timeout: 256 seconds)
22:22:12*bjz joined #nim
22:22:13Araqnot sure it was a good idea
22:22:18dom96Araq: The usage of 'all' looks suspicious
22:22:23dom96Perhaps it's to blame
22:23:27Araq waitFor all(matchmake(), matchmake()) # matchmake() returns a new future afaict
22:23:43Araqwhat's suspicious about that?
22:25:51dom96I mean, the `all` procedure handles exceptions incorrectly.
22:26:10dom96or I should say: they handle failed futures incorrectly
22:26:18dom96s/they/it/
22:27:13Araqoh? how about they work properly instead? :P
22:27:38dom96what?
22:28:07Araqshouldn't it handle failures correctly?
22:28:14Araqwhat does it even mean?
22:29:35dom96yes>
22:29:45dom96I mean: its got a bug
22:29:48dom96*it's
22:30:04Araqoh never mind, I'm tired
22:30:24AraqI mean, yes there is a bug here, most likely, but actually it doesn't concern me
22:34:23*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:34:55*Sentreen joined #nim
22:41:09*yglukhov quit (Remote host closed the connection)
22:41:09*Varriount|Phone quit (Read error: Connection reset by peer)
22:41:23dom96indeed, looks buggy to me https://github.com/nim-lang/Nim/blob/devel/lib/pure/includes/asyncfutures.nim#L266
22:42:51*Varriount|Phone joined #nim
22:45:21*Varriount|Phone quit (Read error: Connection reset by peer)
22:45:44dom96Araq: try now
22:45:44*Varriount|Phone joined #nim
22:45:53dom96I pushed a fix
22:51:21*Varriount|Phone quit (Ping timeout: 265 seconds)
22:54:27Calinouin Nim, how do I assign (overwrite) an existing sequence index?
22:57:07Araqdom96: sorry, will do later, as I said, it's not important for me right now
22:57:41dom96Calinou: x[0] = value
22:58:00Calinoudom96: tried, and the compiler says it "can't be assigned to"
22:58:18dom96use 'var'
22:58:21dom96not 'let'
22:59:15Calinouah, nevermind, there was some other issue with my code
23:21:09*Sergio965 joined #nim
23:24:32*brechtm joined #nim
23:29:10*brechtm quit (Ping timeout: 268 seconds)
23:38:40*Demos quit (Read error: Connection reset by peer)
23:41:37*yglukhov joined #nim
23:46:10*yglukhov quit (Ping timeout: 250 seconds)
23:52:56*Demos joined #nim
23:56:53*cheatfate joined #nim
23:59:49*desophos joined #nim