<< 22-01-2017 >>

00:03:25*Trustable quit (Remote host closed the connection)
00:04:09plmfederico3: using what compiller? gcc?
00:04:18federico3yep
00:04:58plmfederico3: could you to try LLVM?
00:05:27plmfederico3: just to know if problem with portability of rust is just becouse are using LLMV
00:05:41federico3well not at the moment
00:05:41*couven92 quit (Read error: Connection reset by peer)
00:15:38*Vladar quit (Quit: Leaving)
00:21:12FromGitter<philip-wernersbach> Anyone here game jamming?
00:23:35dom96sadly no :)
00:26:54*plm quit (Quit: leaving)
00:30:55*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:32:47*yglukhov joined #nim
00:33:16FromGitter<zacharycarter> I'm failing hard at setting up the structure of my game project
00:33:27FromGitter<zacharycarter> I can't figure out how to create a hybrid binary / library project with nimble
00:33:48dom96zacharycarter: where are you getting stuck?
00:33:57dom96I assume you found the section on it in Nimble's readme?
00:34:04FromGitter<zacharycarter> I did
00:34:32FromGitter<zacharycarter> let me try to put together an example repo real quick of what I'm trying to do and maybe you guys can give me some pointers
00:34:38FromGitter<zacharycarter> be back shortly
00:34:55FromGitter<zacharycarter> I keep starting over so it's deviated from my original attempt
00:37:11*yglukhov quit (Ping timeout: 258 seconds)
00:37:32dom96If you need an example, Nimble is a hybrid library/binary package
00:44:30FromGitter<zacharycarter> https://github.com/zacharycarter/derelict
00:44:36FromGitter<zacharycarter> yeah that's where I started pretty much
00:44:54FromGitter<zacharycarter> it may be just something wrong in my code - I'm a Nim novice
00:45:24FromGitter<zacharycarter> the error I get is - derelict.nim(10, 28) Error: undeclared field: 'glfwWindow'
00:45:54FromGitter<zacharycarter> please ignore the binary in the root - I'll have to take care of that in the gitignore
00:46:57*nsf joined #nim
00:49:24dom96zacharycarter: what glfw wrapper are you using?
00:50:17FromGitter<zacharycarter> https://github.com/rafaelvasco/nimrod-glfw
00:52:26dom96hrm, shouldn't your .nimble file specify `nimrod-glfw` as a requirement instead of `glfw`?
00:53:10dom96Your issue is that this needs to be exported: https://github.com/zacharycarter/derelict/blob/master/src/derelictpkg/window.nim#L9
00:53:14dom96Add an asterisk to do that
00:53:24dom96glfwWindow*: glfw.Window
00:53:31FromGitter<zacharycarter> ahh okay thank you
00:53:55FromGitter<zacharycarter> I'll go read the docu on exporting variables
00:55:06FromGitter<zacharycarter> makes sense now though - I was wondering how to handle access modifiers
00:55:33dom96yeah, everything is private by default
00:56:11FromGitter<zacharycarter> gotcha
00:56:48kulelu88hey dom96 , how do I use the modulo to check for a remainder in a float ?
00:57:10dom96zacharycarter: also I'm not sure which glfw library is better but there is also this one https://github.com/ephja/nim-glfw
00:57:36dom96kulelu88: x mod 2?
00:58:35kulelu88dom96: what if I want to do something like: x = y / 2 ... [check if a remainder exists, if yes, number is odd)
00:59:08kulelu88if mod(x) == true ?
01:00:29dom96if x mod 2 == 0
01:01:32cheatfatekulelu88, there is no reminder in floats division... only integers can have reminder and modulo
01:01:47kulelu88wrapping my head around the returns of procs for a static language is quite ... different
01:02:26*bjz joined #nim
01:02:32kulelu88alright, I get it now. gotta use the modulo check before dividing
01:03:05dom96'night
01:06:21kulelu88cheatfate: how do I force an int / 2 to return an int ?
01:06:52*nsf quit (Quit: WeeChat 1.7)
01:07:11cheatfatea div b
01:07:21cheatfatekulelu88, a div b
01:08:19kulelu88numbers.nim(34, 14) Error: type mismatch: got (int) but expected 'float'
01:08:48kulelu88cheatfate: ^^
01:08:57cheatfateshow me the code
01:09:08cheatfategist code please
01:09:53cheatfatebecause `proc `div` *(x, y: int): int {.magic: "DivI", noSideEffect.}
01:09:53cheatfate` defined in system.nim
01:12:10kulelu88cheatfate: https://glot.io/snippets/emeletymcy
01:13:31*pie_ quit (Ping timeout: 240 seconds)
01:13:40kulelu88I added the imports
01:14:33cheatfateworks and compiles for me
01:14:49kulelu88yeah but there's an error at the bottom, if you can see it
01:15:33cheatfatekulelu88, i dont know what is using glot.io, because nim in my pc compiles this program and run it
01:15:51kulelu88cheatfate: let me just pastebin it regularly
01:17:19kulelu88cheatfate: please try running this: https://www.zerobin.net/?3f14c41ec3ae378d#SQjRzdmKHWaKBUoi25IrCHKkGkH5yPdzAkmpllaIOGc=
01:18:08cheatfatekulelu88, it runs as expected, what version of nim you are using?
01:18:15kulelu880.16
01:18:51cheatfateOS?
01:19:37kulelu88cheatfate: aah yes, it runs now. sorry about that sir
01:21:11FromGitter<Varriount> federico3: C.H.I.P?
01:21:23kulelu88cheatfate: when you run it, does it output a '0' at the end? if yes, why?
01:24:57cheatfatekulelu88, because default return value of your function is `0`.
01:25:22cheatfatekulelu88, you have not specified return value, when it is odd
01:28:24Amun_RaVarriount: see CHIP8, an arm based sbc
01:37:37*arnetheduck joined #nim
01:38:26*dddddd quit (Quit: Hasta otra..)
01:39:42*brson joined #nim
01:47:30*chemist69 quit (Ping timeout: 252 seconds)
01:52:11*chemist69 joined #nim
02:14:03*Ven joined #nim
02:19:52*aaaaa joined #nim
02:20:13*def-pri-pub joined #nim
02:20:50def-pri-pubAraq: I know you've already commented on my forum post regarding the `interfaces`. Is there anything else you can think of? I do want to get some more input on them before I go any further.
02:21:50*aaaaa quit (Read error: Connection reset by peer)
02:22:13*aaaaa joined #nim
02:23:14*aaaaa quit (Read error: Connection reset by peer)
02:23:31*aaaaa joined #nim
02:24:04*aaaaa left #nim (#nim)
02:24:47*handlex joined #nim
02:27:20*chemist69 quit (Ping timeout: 240 seconds)
02:34:43*yglukhov joined #nim
02:37:23*handlex quit (Quit: handlex)
02:39:04*yglukhov quit (Ping timeout: 258 seconds)
02:41:21*chemist69 joined #nim
02:43:25*sz0 joined #nim
02:52:38*ARCADIVS joined #nim
02:56:29TheManiacIs it possible to nest calls to iterators? e.g. mySeq.iterator1().iterator2()?
02:56:59TheManiacSeems like the call to iterator2 means that nim doesn't think that iterator1 is being called in an iterator context
02:59:51TheManiacdef-pri-pub: aren't concepts nim's answer to interfaces?
03:07:25TheManiacNot that I've ever really tried to use them, but if you have defined the concet of a Duck, why do you need an interface for one? (Or have I totally misunderstood what concepts do?)
03:12:36*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:28:30*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:31:42*Ven joined #nim
04:01:23*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:07:12*Ven joined #nim
04:10:02*Ven quit (Client Quit)
04:15:30*Ven joined #nim
04:16:32Araqdef-pri-pub: you need to ensure that an object type can implement multiple interfaces at the same time
04:16:47Araqhaven't checked if the proposals support that
04:20:21FromGitter<zacharycarter> Running into another problem with opengl - https://gist.github.com/zacharycarter/edb5d5067c6d6bd308d2d4948e2e533dhttps://github.com/zacharycarter/derelict/blob/master/src/derelict.nim#L14
04:23:39*Ven quit (Read error: Connection reset by peer)
04:23:45*Ven_ joined #nim
04:25:29Araqwhat's the problem?
04:26:02FromGitter<zacharycarter> First link has a sigsev in it
04:27:26FromGitter<zacharycarter> https://gist.github.com/zacharycarter/edb5d5067c6d6bd308d2d4948e2e533d#file-error-log-L33
04:28:29Araqcall loadExtensions? :-)
04:29:16*bjz joined #nim
04:31:17FromGitter<zacharycarter> okay I get it now thank you @Araq
04:31:30FromGitter<zacharycarter> first I was calling loadExtensions without loading any
04:31:39FromGitter<zacharycarter> now I'm loading them without calling loadExtensions first as the docu says
04:32:17Araqthis loadExtensions business is a PITA and needs to get better
04:32:57FromGitter<zacharycarter> well to further confuse things I'm looking at older examples where they don't have that issue I reported this morning
04:33:23FromGitter<zacharycarter> so they call loadExtensions without loading any first, which is what caused my confusion just now
04:36:20FromGitter<philip-wernersbach> *Yawn* game jam is a tour-de-force sometimes
04:36:55*yglukhov joined #nim
04:37:37FromGitter<philip-wernersbach> @Araq What caused this commit: https://github.com/nim-lang/Nim/commit/9753782f96bcd9b35a4c45d6cb20de2a85c33e55
04:38:12FromGitter<philip-wernersbach> I'm hoping it may fix memory consumption I've seen in https://github.com/philip-wernersbach/influx-mysql
04:38:44Araqwell try it?
04:38:56Araqit's the reason we need to release 0.16.2 soon
04:39:09Araqwas introduced in 0.16.0
04:40:56Araqbut: the fix in 0.16.0 also dealt with memory fragmentation problems, so yeah, hopefully that fixes your memory consumption problems
04:41:06*yglukhov quit (Ping timeout: 240 seconds)
04:41:40FromGitter<philip-wernersbach> Oh okay never mind. I've had large memory consumption since I started programming it, three Nim versions ago
04:42:38FromGitter<philip-wernersbach> I'll try 0.16.2 with it once it comes out, always good to see progress. Not sure how much of the memory consumption is due to Nim though, and how much is due to the memory intensive nature of the problem
04:44:03Araq0.16.2 has a "heap dump" feature that can tell you
04:44:42*brson quit (Read error: Connection reset by peer)
04:45:15kulelu88what is the problem you are addressing?
04:47:49FromGitter<philip-wernersbach> @Araq How can I use that? That would be so useful
04:48:53Araqcompile with -d:nimTypeNames and at a strategic place call
04:49:10AraqdumpNumberOfInstances()
04:49:21Araqbut it's new in devel
04:50:08*brson joined #nim
04:50:41FromGitter<philip-wernersbach> @kuleulu88 It's not a bug or issue, but an annoyance. Putting a large amount of data through influx-mysql causes a large amount of data to be allocated (obviously), that never gets unallocated.
04:51:41FromGitter<philip-wernersbach> As an aside, I have a hard time believing that 64MB of data can use up to 512MB after parsing and transforming into data structures. Rather, I think it's fragmentation
04:52:36FromGitter<philip-wernersbach> @Araq Thanks for the tip, I'll definitely take advantage of that
04:55:40*ARCADIVS quit (Ping timeout: 245 seconds)
04:56:55kulelu88sounds like you need manual memory allocation, which Nim offers
04:57:44FromGitter<philip-wernersbach> @Araq Oh also, what is the status of coroutines, the stack gc, and gc2? All three have been in the standard library for a while
04:58:36*kulelu88 quit (Quit: Leaving)
04:59:07FromGitter<philip-wernersbach> kulelu88 You're probably right, but I'd rather not
05:06:27*ARCADIVS joined #nim
05:06:53Araqcoroutines: looked into it, won't be ready anytime soon
05:07:28*m_rk joined #nim
05:07:39*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:08:55Araqgc2: likely to be abandoned. instead of an incremental M&S GC for cycles, somebody needs to take an intensive look at how Swift avoids cycles
05:10:29Araqstack "gc": still very promising and a good match for Nim's write tracking and escape analysis.
06:10:05*Ven joined #nim
06:13:43*def-pri-pub quit (Quit: leaving)
06:16:53*m_rk quit (Ping timeout: 240 seconds)
06:32:11*chemist69 quit (Ping timeout: 264 seconds)
06:32:53*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:38:31*yglukhov joined #nim
06:42:59*yglukhov quit (Ping timeout: 264 seconds)
06:53:04*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:59:10*chemist69 joined #nim
07:02:29*bjz joined #nim
07:08:12Araq„On Termix (and likely other non-rooted device environments) many parts of the root filesystem are read-only.
07:08:12AraqThis causes Nimble (and likely lots of other Nim stuff) to fail trying to write to /tmp.“
07:08:42FromGitter<Varriount> @Araq I thought coroutines were already implemented?
07:10:01Araq@varriount tests fail for me and the fact that a single external assembler is able to compile the assembler doesn't help
07:10:35Araqwhat's the point of a readonly /tmp filesystem?
07:12:13FromGitter<Varriount> Araq: Beats me. Seems like something a computer-illiterate auditor might demand in the name of security.
07:12:36FromGitter<Varriount> Unless only root is allowed to write to /temp?
07:13:06*Ven joined #nim
07:13:27FromGitter<Varriount> @Araq On the topic of Swift, the documentation basically states that resolving strong reference counts is the responsibility of the programmer.
07:15:14Araqvarriount: yes I'm aware but I think they have some trick involving closures
07:16:05FromGitter<Varriount> Oh, you mean to prevent cycles for closures?
07:16:57FromGitter<Varriount> Does a reference cycle always occur with a closure in Nim?
07:19:47*sz0 quit (Quit: Connection closed for inactivity)
07:20:03Araqnot always, but very often
07:23:56FromGitter<Varriount> Araq: What's the most common cause?
07:24:18Araqyou capture too much
07:24:37Araqinstead of capturing only x.foo, you capture the full 'x'
07:24:40*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:24:54Araqx containing the closure
07:24:59Araqtata, cycle.
07:25:33FromGitter<Varriount> Araq: Do closures in Nim capture everything in the parent scope (internally)?
07:25:59Araqthe compiler computes what is captured
07:26:06Araqso no.
07:26:23FromGitter<Varriount> The only thing I can find in the swift documentation on cycles in closures is that an explicit capture list must be used to prevent them
07:27:56Araqwe can statically compute the backrefs and internally make them ptr instead of ref
07:28:12Araqwell, we can in many cases.
07:28:31Araqbut the type graphs are incomplete in general.
07:29:39FromGitter<Varriount> Araq: Well, it seems that in the case of Swift, the language requires the programmer to resolve cycles.
07:33:13FromGitter<Varriount> Araq: Like too many things in programming, it seems there is no silver bullet.
07:36:33FromGitter<Varriount> Araq: Does the current mark & sweep collector have the ability to output the cycles it detects?
07:37:39*Ven joined #nim
07:37:53Araqno, it doesn't detect cycles
07:37:58Araqit marks and sweeps
07:38:22FromGitter<Varriount> Hm.
07:38:39FromGitter<Varriount> Could it be modified to do so?
07:38:42Araqbut your idea is great. detect cycles at runtime and make the programmer add annotations for production
07:38:53FromGitter<Varriount> I'm wondering if something like profile-guided optimization might be used for the reference cycle problem too
07:39:18FromGitter<Varriount> If nothing else, to minimize the performance impact
07:44:07FromGitter<Varriount> @Araq I don't know how developers might react to debugging output in their executables though, even if they were compiled in debug mode.
07:45:08Araqit's 2017. we don't have to output profiling information to stdout
07:45:30Araq(or would that be stderr? who knows...)
07:50:00*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:10:09*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:14:46*bjz joined #nim
08:24:26*rokups joined #nim
08:33:13*brson quit (Ping timeout: 248 seconds)
08:37:44*brson joined #nim
08:40:05*yglukhov joined #nim
08:44:06*yglukhov quit (Ping timeout: 240 seconds)
08:48:51AraqTraceback (most recent call last)
08:48:51Araqtoy.nim(95) toy
08:48:51Araqtoy.nim(92) main
08:48:53Araqui.nim(27) pollingMainLoop
08:48:55Araqtoy.nim(92) :anonymous
08:48:57Araqasyncdispatch.nim(1072) poll
08:48:59AraqError: unhandled exception: No handles or timers registered in dispatcher. [ValueError]
08:49:05Araqwe had this discussion before, I think.
08:49:18Araqthis behaviour is wrong.
08:49:25*byte512 joined #nim
08:50:10Araqthe fact that I call 'poll' with a timeout pretty much suggests that eventually there could be registered events in the poll loop
08:59:47gangstacatcertainly a noob question but is it possible to iterate over a range in a set in order to give the values on buttons and pass the value on a procedure using ui module?
08:59:49gangstacathttps://gist.github.com/gangsterakato/df30123c84f9ceb38365f32d71d1f487
09:05:55FromGitter<Varriount> gangstacat: Does it have to be a set?
09:06:35gangstacatVarriount, no
09:08:32FromGitter<Varriount> gangstacat: I'm on my phone at the moment. What happens if you just do `for letter in 'A'..'I':` ?
09:08:47FromGitter<Varriount> (Spacing exactly like that)
09:08:48gangstacatVarriount, same thing, always the last element
09:11:45FromGitter<Varriount> Wait, what?
09:13:13*yglukhov joined #nim
09:13:33FromGitter<Varriount> Try turning that inline closure into a proper nested closure, and see what happens
09:23:31*yglukhov quit (Remote host closed the connection)
09:26:54*yglukhov joined #nim
09:27:18cheatfateAraq, behavior is not wrong, it warns you that you are doing wrong...
09:30:44*nsf joined #nim
09:31:06*yglukhov quit (Ping timeout: 240 seconds)
09:36:49Araqgangstacat: that's just how Nim's closures work, you need a wrapper closure to produce a new context for the for loop variable
09:37:09Araqsame issue in JS really, nothing to do with events
09:43:06Araqcheatfate: what's wrong with this
09:43:29Araq while true:
09:43:29Araq poll(timeout)
09:43:30Araq discard rawui.mainStep(timeout.cint)
09:44:37*sz0 joined #nim
09:51:02dom96Araq: http://nim-lang.org/docs/asyncdispatch.html#hasPendingOperations,
09:51:51FromGitter<Varriount> gangstacat: If it makes you feel better, it happens in Python too.
09:52:23gangstacatah.. I don't know if that makes me feel better honestly :'D
09:52:42FromGitter<Varriount> Also, I would have been puzzled about it too.
09:53:26FromGitter<Varriount> Although, it helped that I recalled a similar user problem in the past. And @Araq saying something about closure creation.
09:53:59FromGitter<Varriount> gangstacat: It also helps if you know the internals of closures.
09:54:15gangstacatcan you show me an example or..?
09:54:25FromGitter<Varriount> An example of...?
09:55:37gangstacatnothing, I will try to resolve this, thanks both of you
09:55:53FromGitter<Varriount> @Araq can correct me if I'm wrong, but when a closure is created, all variables from the outer scopes that are 'captured' (referenced) by the closure are lifted into an implicit object.
09:56:30FromGitter<Varriount> This transforms all assignments in the outer scopes into assignments that mutate that object.
09:57:58FromGitter<Varriount> And since only (normally) one of the implicit object is created, redefinitions of the closure in a loop will still use the same instance of the implicit object.
09:58:38FromGitter<Varriount> I don't like the behavior, but it's probably tough to change, and/or inefficient for the majority of other cases.
09:59:13FromGitter<Varriount> (as evidenced by the fact that this behavior is exhibited by two other languages, both of which are much more dynamic in nature than Nim).
10:01:11FromGitter<Varriount> @Araq Would it be possible/a good idea for the compiler to warn about such behavior (that is, redefining a closure in a loop)?
10:03:49FromGitter<Varriount> gangstacat: What you need to do is create a separate procedure that creates and returns the update closure, then call that in a loop
10:04:45Araqdom96: ah ok
10:05:15Araqvarriount: the behaviour *changed* from the behaviour everybody wants to the current behaviour
10:05:37Araqwe could warn about captures of for loop variables though
10:10:53dom96it changed but for a good reason: the old behaviour was inconsistent with JS which made things complex
10:11:50Araqit also was a pita to maintain. closure iterators capturing closures capturing scopes, not proc environments ...
10:12:09Araqit's a combinatorial explosion of cases
10:17:57*Parashurama joined #nim
10:18:12Parashuramahello everyone
10:19:23Araqhi Parashurama
10:19:48ParashuramaAraq: so I'm trying to find a way
10:20:26ParashuramaAraq: to make the opengl package have better compatibility with different opengl versions.
10:22:10ParashuramaAraq: right now If I add GL_DOUBLE support to my program, it will raise an error if i run on a computer with a less recent driver since support unsupported functions are not eliminated.
10:23:00Parashuramaperhaps a compile time flag that allow nimloadProc to not raise an error it function not found.
10:23:22Parashuramaor even a way to queck if extensionnameARB is supported.
10:23:56Parashurama*check
10:37:43*vlad1777d joined #nim
10:42:57*Vladar joined #nim
10:48:45*arnetheduck quit (Ping timeout: 256 seconds)
11:05:33*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:10:37*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
11:10:58*Kingsquee joined #nim
11:18:28AraqParashurama: only what you use it loaded, so I am not sure I understand your problem
11:18:30Araqbut bbl
11:25:37*ftsf joined #nim
11:28:05ParashuramaAraq: exactly: I f i compile my program on Computer1 (OGL 4) then distribute to other Computer2 (OGL3) with C/C++ I can use runtime fallback to OGL3 path, but since nimloadProc check at runtime if OGL4 functions is present it fails on computer2
11:29:21*bjz joined #nim
11:32:12*brson quit (Read error: Connection reset by peer)
11:32:29*brson joined #nim
11:44:03*couven92 joined #nim
11:59:47*sz0 quit (Quit: Connection closed for inactivity)
12:03:03*Snircle joined #nim
12:24:38*Trioxin joined #nim
12:39:05*ARCADIVS quit (Quit: ARCADIVS)
12:44:38*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:51:54*chemist69 quit (Ping timeout: 252 seconds)
12:54:36*chemist69 joined #nim
13:01:45*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:12:43*nsf quit (Quit: WeeChat 1.7)
13:16:22*zevlg quit (Read error: Connection reset by peer)
13:17:45*abruanese quit (Ping timeout: 245 seconds)
13:22:42*Parashurama left #nim (#nim)
13:24:57*abruanese joined #nim
13:29:33*brson quit (Ping timeout: 276 seconds)
13:39:31*Trustable joined #nim
13:48:05nivdom96: is it possible that bin=[] support in nimble is kinda broken in what gets shipped with 0.16?
13:48:35dom96niv: I don't think so, what's broken with it?
13:49:01*PMunch joined #nim
13:49:25nivdom96: https://gist.github.com/niv/ea0fbf758cee8c6d6c5a4e954fc63394
13:49:38nivthis is with a empty ~/.nimble/
13:50:06*Trioxin quit (Ping timeout: 240 seconds)
13:50:19nivi tried the same with a nimble compiled from HEAD and there it worked (even though it still emitted that weird warning)
13:50:57dom96hrm, yeah, I think that was fixed in HEAD
13:51:05nivokay, just checking
13:51:11nivwhats the warning about? doesnt make any sense to me
13:53:18dom96I suppose I should just get rid of that warning, it's not really anything to be worried about.
13:53:43dom96When Nimble installs your package it copies everything in src/
13:53:52dom96to ~/.nimble/pkgs/pkgblah-ver
13:53:59dom96then it copies the binaries
13:54:14dom96but your src/ dir already contains the binaries so they were copied already
13:54:29dom96so nimble copies them twice
13:54:36nivalright
13:55:03nivthough that shouldnt really happen with my config regardless. im only telling it to explicitly copy the files i listed
13:55:46dom96hrm
13:55:49dom96good point
13:55:54dom96Please report it
13:56:10nivhttps://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L458
13:56:16nivi think the check might actually be accidentally negated
13:56:41nivi just did :p
13:57:10dom96hah, I think you're right
13:57:13dom96oopsie
13:59:17nivdo you really want me to open an issue on gh about this?
14:00:04dom96yeah
14:00:56nivwill do
14:02:28AraqError: unhandled exception: Received length doesn't match expected length. Wanted 31805674 got 11950269
14:03:37dom96Araq: ouch, a bug in httpclient?
14:03:59Araqseems so but this thing is hardly usable as it is anyway
14:04:53dom96why?
14:05:44Araqlet contents = await client.getContent("http://nim-lang.org/download/" & pkg & ".zip")
14:05:44Araq let z = "dist" / pkg & ".zip"
14:05:44Araq writeFile(z, contents)
14:06:10Araqbut 'writeFile' is not async and even it were
14:06:22AraqI want an async 'downloadFile' operation
14:06:51Araqthere is no need to have a 80MB string buffer containing the zip just to store it on disc
14:07:37dom96yes, for that we need async streams
14:07:37euantor+1 Araq
14:08:09euantorI actually have a very similar use case for a system I implemented at work, which downloads a bunch of files and zips them up for installing to servers automatically
14:08:44Araqno we don't need async streams for that, the API doesn't expose a streaming interface, it would take a 'destfile: string'
14:10:08dom96okay, feel free to implement it that way then
14:10:09euantorIdeally it would use `sendfile` on linux
14:10:26euantorNot sure if Windows has a similar function
14:10:31Araqbut there is a different problem
14:10:45Araqright now the event loop doesn't seem to work properly
14:11:10AraqI need to move the mouse to trigger "continue with the download" events ... what a piece of crap
14:12:09dom96you mean the libui event loop isn't working?
14:12:53dom96Are you using this? https://github.com/nim-lang/ui/blob/master/ui/rawui.nim#L23
14:13:39Araqyes
14:13:56dom96with what `wait` argument?
14:14:45Araq10
14:14:52Araqchanged it to 0, now it works
14:15:00Araqapparently it's in seconds then?
14:15:26dom96Perhaps a bit too premature for "what a piece of crap"
14:15:43Araqoh I meant my program
14:15:50Araqnot necessarily the used libraries
14:15:54dom96I see
14:16:11Araqbut hmm, now it works and I have a nice progress bar
14:16:45dom96Funny how I knew exactly where you went wrong ;)
14:18:09Araqyes, you are a genius. now. how do I cancel a httpclient download?
14:19:23dom96hah
14:19:47dom96You can't right now I'm afraid
14:19:56dom96No support for cancelling futures yet
14:21:40AraqI can crash the program, I guess
14:22:21dom96if you're cancelling the download then you essentially want to exit out of the program anyway right?
14:23:16Araqright
14:24:29Araqugh, even the sync downloadFile uses full file buffering. that's not acceptable.
14:29:35*nsf joined #nim
14:42:21federico3Varriount: getchip.com
14:44:15*handlex joined #nim
14:44:51nivalternative to chip, http://www.nanopi.org/
14:45:18federico3smaller but more expensive
14:45:40nivkind of but not really. i got the neo for like 8 quid
14:45:57nivbut its not exactly a *great* board, its allwinner after all
14:46:42federico3CHIP + shipping were around 10e each and they have onboard flash and wifi
14:46:56nivoh, cool stuff.
14:47:11federico3oh, the nanopi has an 8GB MMC actually
14:47:26nivim kind of disenchanted with all these arm boards. they arent really useful unless you go for a raspberry, otherwise you are stuck with a very old, crappy kernel and ubuntu core
15:06:49*hendi joined #nim
15:07:10*hendi quit (Client Quit)
15:10:55Araqeuantor: https://msdn.microsoft.com/en-us/library/ms775123(v=vs.85).aspx
15:12:02cheatfateAraq, `sendfile` is a nice feature and urldownloadtofile != sendfile in any case, because sendfile is sending from one fd to another fd, while urldownloadfile is just for downloading file from net
15:13:39euantorThat would do it Araq
15:13:54Araqcheatfate: can shellExecute unzip a .zip file?
15:14:06cheatfateAnd because `sendfile` is syscall its very fast, but some times it causes problems because of custom kernel defaults
15:15:01cheatfateAraq, you need to look decompressor here https://msdn.microsoft.com/en-us/library/windows/desktop/hh437556(v=vs.85).aspx
15:16:05*xet7 quit (Ping timeout: 245 seconds)
15:17:09Araq"Compressapi.h on Windows 8 and Windows Server 2012"
15:17:29AraqI bet shellExecute does work
15:17:55*yglukhov joined #nim
15:28:47*hendi joined #nim
15:30:05*hendi quit (Client Quit)
15:32:11*chemist69 quit (Ping timeout: 264 seconds)
15:32:54*yglukhov quit (Remote host closed the connection)
15:33:00Araqasyncfutures.nim(125) fail
15:33:00Araqasyncfutures.nim(220) :anonymous
15:33:00AraqError: unhandled exception: Operation timed out
15:33:45Araqthis happens after the download is complete afaict
15:34:21*chemist69 joined #nim
15:34:42PMunchI'm poking around with wxWidgets again
15:34:53PMunchAnd I see it uses "cnew" what's that?
15:35:48*yglukhov joined #nim
15:38:01*handlex quit (Quit: handlex)
15:38:03Araqc++'s new
15:38:15PMunchAh, okay
15:42:50Araqdoes the 3way merge work?
15:43:14*GustavoLapasta joined #nim
15:47:01*PMunch quit (Ping timeout: 240 seconds)
15:49:20GustavoLapastaIn c, if I want to calculate the offset of a field in an object I'd write something like
15:49:28GustavoLapasta (size_t) & ((MyObject *) 0) -> myField)
15:49:39GustavoLapastaHow would I do it in Nim?
15:50:00*handlex joined #nim
15:52:52Araqthe same way
15:54:36*handlex quit (Quit: handlex)
15:59:35*Trustable quit (Remote host closed the connection)
16:08:30*irrequietus joined #nim
16:10:09GustavoLapastaI'm sorry, but my Nim knowledge isn't strong enough yet. How would I do that "the same way"?
16:10:31GustavoLapastaI've been trying playing with addr(), but with poor results
16:13:06*pie_ joined #nim
16:19:12yglukhovcast[csize](addr(cast[ptr MyObject](0).myField))
16:19:19yglukhovGustavoLapasta
16:20:42Calinouhey GustavoLapasta :P
16:21:34*handlex joined #nim
16:36:01FromGitter<philip-wernersbach> @Araq Why is gc2 going to be abandoned? No time?
16:36:06GustavoLapastahey Calinou :)
16:36:21GustavoLapastathanks yglukhov
16:36:47Araqwell it crashes and I'm not sure the approach has enough merits
16:38:40FromGitter<philip-wernersbach> Ah okay
16:39:24*hendi joined #nim
16:40:08FromGitter<philip-wernersbach> On an unrelated topic, everyone keeps asking about coroutines. I'm not sure I get how coroutines are better than the async we have now
16:42:18*handlex quit (Quit: handlex)
16:46:49Araqthey are not better but would be easier to work with.
16:54:29*Parashurama joined #nim
16:57:44ParashuramaAraq: pingback to our earlier conversation. To make this simple. I wish to make a single application that select either GL3 or GL4 (if available) at runtime. I currently can't since in case GL4 is not supported, nimloadProc will raise an error if func address is not found.
16:58:34Araqoutside the box thinking: produce 2 exes and a dispatch.exe
16:58:39Araq:P
16:58:57Araqor patch the codegen to support a fallback for nimloadproc
16:59:17Araqbut even I don't remember how nimLoadProc works
16:59:58ParashuramaIf you find this acceptable I can try to make this works with a compile time flag.
17:00:29Parashuramabut, dispatch.exe can also be a possibility.
17:01:04Parashurama*compile time flag that will allow missing proc address
17:02:49ParashuramaThe logic is in fact not that complicated. like GLFW, and GLEW it looks at runtime for opengl proc address in opengl.dll/so/dynlib only if the proc is used in program (always remove dead code)
17:04:10ParashuramaAraq: Also what do you think about the current endians.nim module depanding on bitops.nim for compiler intrinsics
17:07:16cheatfateParashurama, for such problems its much easier to adopt opengl module...
17:07:58Parashuramacheatfate: I'm not sure what you mean by 'adopt'
17:08:09Parashuramado you mean fork?
17:08:30cheatfateas for me its much better to know you have problems when you starting application, then get problems when somebody press some button which uses procedure from missing dll...
17:09:54ParashuramaI understand what you mean but when using C/C++ I can guard GL4 func at runtime by defining a variable at startup if opengl4 is supported
17:10:41cheatfatenow i dont understand
17:10:54ParashuramaOkay:
17:11:04ParashuramaProc render():
17:11:09cheatfatethe only problem i see is that nimgl wrapper is works for some version of opengl and don't supports other
17:11:24Parashuramaif GL4supported: # runtime var
17:11:34Parashurama # gl functions stuffs
17:11:36Parashuramaelse
17:11:42Parashurama #gL3 stuff
17:11:54cheatfatehttps://github.com/nim-lang/Nim/blob/devel/lib/upcoming/asyncdispatch.nim#L296
17:12:01cheatfateParashurama, please check how i do it
17:12:24cheatfateI'm declaring variables which can be used as procedures...
17:12:28cheatfatei think it can help
17:12:48Parashuramayou mean funtion pointer
17:12:55Parashurama*function pointer
17:13:02cheatfateyep you can do it for opengl wrapper in same way
17:13:20cheatfateand you can define your runtime variable
17:14:12cheatfatewinlean.nim has this https://github.com/nim-lang/Nim/blob/devel/lib/windows/winlean.nim#L854 (i think its more close to what you need)
17:14:19Parashuramamaybe it can work, but the thing is: the current doesn't even allow for testing if GL4 is supported. it just raise an error if proc address is not found
17:14:41Parashuramaor any other version, really.
17:15:12cheatfateParashurama, PRs are welcome :) (C) Araq
17:15:43ParashuramaYeah, I will try to see what I can do.
17:16:03Parashuramabtw: cheatfate what kind of compiler/platform do you use.
17:16:12cheatfatewindows
17:16:34cheatfate10x64 also i have linux/freebsd/openbsd/netbsd/macosx/solaris as VMs
17:16:46Parashuramaexcellent, I kind of need some testers for my PR on bitops module.
17:17:33ParashuramaI only have access to gcc/clang on x64 linux. add ICC is a PITA to download/install.
17:17:40Parashurama*and
17:18:37cheatfateParashurama, i think install VM is not a problem too, if you want i can share my macosx vmware image, because it much harder to obtain, then any other images
17:20:00ParashuramaProblem is my current setup doesn't really work with WMs. (only 2Go RAM)
17:20:36Parashuramabut I have used VirtualBox in the past quite a lot for running windows apps on linux.
17:21:36ParashuramaI can barely get by with an old Xp WM at the moment.
17:22:43*hendi quit (Quit: hendi)
17:24:18cheatfateParashurama, you can also use https://www.appveyor.com for windows tests
17:27:45ParashuramaI did not know that. thanks. I will see what it's about.
17:27:51nivstyle guide question: is depending on module prefixes for conflict resolution acceptable/recommended, or should i name procs differently? (a.open(): A vs b.open(): B)
17:29:01*yglukhov quit (Remote host closed the connection)
17:30:03Parashuramaniv: good question. having 10 'open' proc in the current scope can sometimes be confusing when debugging why your proc does something unexpected.
17:32:52nivim leaning toward using the module name for scoping, instead of messing up my naming scheme
17:33:46Parashuramasomething like 'from module import nil' can be useful for this usecase
17:34:04nivor just "import module as xx; xx.open()"
17:34:27nivwhat does import nil do?
17:35:10Parashuramaactually I'm not sure if 'import module as xx' pollute the current namespace with module definitions
17:35:20Parashurama*goes check documentation
17:36:24GustavoLapastayglukhov>, Araq: that example for evaluating the offset of a field in an object fails in some cases: https://paste.kde.org/po171u8aq
17:36:48GustavoLapastais that because Nim aligns fields in memory?
17:39:59Parashuramacheatfate: appearently this syntax pulls definitionto current scope and also allow to adress module proc as xx.func
17:42:08cheatfateGustavoLapasta, its not nim, its how c compiler align fields inside of structures, please use buggy {.packed.} pragma
17:42:23cheatfatebbl
17:43:21ParashuramaGustavoLapasta: here is a template that works for me
17:43:27Parashuramatemplate offsetof*(typ, field): expr = (var dummy: typ; cast[int](addr(dummy.field)) - cast[int](addr(dummy)))
17:43:55Parashuramasorry more recent version
17:43:57Parashuramatemplate offsetof*(typ, field): untyped = (var dummy: typ; cast[int](addr(dummy.field)) - cast[int](addr(dummy)))
17:46:52GustavoLapastathanks Parashurama. It gives the same result anyway.
17:49:19*Matthias247 joined #nim
17:52:05*rokups quit (Quit: Connection closed for inactivity)
18:04:46GustavoLapastawhich on second thought is actually the right result. The example made should return "2" only on 16 bit machines :P
18:06:40Parashuramayeah, on most platforms struct fields usually aligned on words for best performance. unless a packed decltype/attribute is used
18:06:55Parashurama* on word size
18:21:59cheatfateFor 32bit platforms alignment is 32bit, for 64bit platforms alignment is 64bit
18:25:12*GustavoLapasta quit (Ping timeout: 252 seconds)
18:26:11*GustavoLapasta joined #nim
18:27:17federico3nimble install c2nim generated an empty file .nimble/pkgs/c2nim-0.9.12/c2nim
18:33:40dom96federico3: bug in the bundled nimble, get HEAD
18:35:22federico3dom96: doing nimble build in the c2nim pkg dir helped
18:46:06*GustavoLapasta quit (Ping timeout: 252 seconds)
18:47:05*GustavoLapasta joined #nim
18:58:23*zetashift joined #nim
19:01:29Araqsorry to be blunt but if you don't even know about alignments you shouldn't use offsetof
19:03:50*yglukhov joined #nim
19:04:54GustavoLapastaThat's fair. In the c code I was looking at, the offset of the field was used like this:
19:05:02GustavoLapastaif (host -> receivedDataLength < (size_t) & ((ENetProtocolHeader *) 0) -> sentTime)
19:06:54GustavoLapastaIt looked a little strange to me, I didn't really bother about the alignments.
19:07:27GustavoLapastahttps://github.com/lsalzman/enet/blob/master/protocol.c#L988
19:21:10FromGitter<zacharycarter> my game engine is coming along... https://github.com/zacharycarter/derelict
19:21:48FromGitter<zacharycarter> really enjoying nim :D
19:24:25*chemist69 quit (Ping timeout: 245 seconds)
19:26:19dom96zacharycarter: nice!
19:26:48dom96I love roguelikes and love sci-fi even more :D
19:27:08*chemist69 joined #nim
19:27:14*yglukhov quit (Remote host closed the connection)
19:27:24dom96One small suggestion: convention for method/proc names is to start with a lowercase letter
19:32:55*GustavoLapasta quit (Quit: Leaving)
19:33:29*m_rk joined #nim
19:35:34*yglukhov joined #nim
19:36:21*yglukhov quit (Remote host closed the connection)
19:36:34*yglukhov joined #nim
19:46:05FromGitter<zacharycarter> gotcha - thank you @dom96
19:47:09*kulelu88 joined #nim
19:48:24*kulelu88 quit (Remote host closed the connection)
19:49:57*bjz_ joined #nim
20:00:45FromGitter<Varriount> > <Araq> sorry to be blunt
20:01:00*Parashurama left #nim (#nim)
20:01:08FromGitter<Varriount> Oh my, Araq, are you actually learning to be tactful? :3
20:01:42AraqI'm always tactful. It's just that people do not understand my politeness.
20:11:32Araqcheatfate: shellExecute opens the zip in an explorer window -.-
20:15:16cheatfateAraq, :)
20:20:46*Trustable joined #nim
20:21:29cheatfateit looks unzipping is much harder then i thought
20:22:12cheatfateAraq, try to change directory to inside of zip file
20:22:50Araqwhy would that make a difference?
20:23:02Araqit would unzip into TEMP, perhaps, yay
20:24:38*libman joined #nim
20:25:38cheatfatestarting from windows xp it has compressed zipped folders
20:25:56Araqbut no API to do that
20:29:50Araqbut it's fine, I will ship 7z.exe with it
20:30:14Araqit's already a messy broken peice of junk
20:32:05*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:37:16*m_rk quit (Quit: Textual IRC Client: www.textualapp.com)
20:39:55cheatfatei think its better to ship zlib.dll then
20:42:04*bjz joined #nim
20:42:06Araqno, 7zG x mingw4.8.1.zip works like a charm
20:42:11Araqwith UI and progress bar and stuff
20:45:38Araqplus we can provide 7z's which are much smaller than zips
20:46:00cheatfate20% is not so much
20:46:07cheatfatealso its not a standard
20:46:19cheatfatei have found a way but we need to interact with COM
20:46:20dom96Can't you statically link zlib?
20:46:23Araqit should be a standard, it's good
20:47:16cheatfateit should be, but not standard
20:47:50Araqdom96: 7zG will cause fewer problems than our httpclient based download feature...
20:48:18Araqwhich often works and occasionally hangs and crashes
20:48:22dom96what's 7zG?
20:48:37*libman2 joined #nim
20:48:38*libman quit (Remote host closed the connection)
20:48:55cheatfateAraq, everything we need to createObject("Shell.Application")
20:49:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:49:11Araqcheatfate: recently a library for COM arrived
20:49:19cheatfateyep we can try to use it
20:50:49cheatfateis somebody have a link?
20:51:03Araqdom96: 7z UI tool that can unpack zip files
20:53:25dom96go for it
20:53:36dom96I will work on a full featured installer at some point anyway
20:54:44Araqyou will hate it.
20:55:05Araqeverything is hard and messy, esp if you care about older Windows versions
20:55:33Araqeven a start menu entry requires fighting with COM
20:55:42dom96If it was easy NSIS/Inno setup wouldn't be the only solutions
20:55:48cheatfateAgree with Araq, making installer is a tough task, making full featured is harder
20:57:21*byte512 quit (Ping timeout: 240 seconds)
21:01:28dom96My thought is that it could be a killer app for Nim.
21:01:46*yglukhov quit (Remote host closed the connection)
21:03:27nivis there a way to map() over a range?
21:03:36nivwithout using experimental list comprehensions that is
21:04:00cheatfatewindows already has installer api inside, still not very usable but most people uses it to create .msi
21:06:00cheatfateweb framework will be killing app, or electron/libCEF replacement without browser inside will be killer app
21:06:41dom96there is plenty of web frameworks out there already
21:06:41*yglukhov joined #nim
21:07:14cheatfateyep and best of them based on interpreted languages, so at least we have one benefit - speed
21:07:25cheatfateand memory consumption
21:07:33dom96the web framework space is highly saturated
21:07:55dom96we would need lots of luck for it
21:08:18nivweb developers are a very hard target to pitch to. things like performance and memory consumption don't really count for them
21:08:20dom96Have you seen the web framework benchmarks?
21:08:27dom96There is a LOT of them
21:08:40nivhardware is so cheap it doesnt matter if the box can handle 1000/s or 10000/s
21:08:41dom96Written in everything from Rust to C and GO
21:08:53*yglukhov quit (Remote host closed the connection)
21:09:09*yglukhov joined #nim
21:10:07cheatfateniv, your words was true like 5 years ago, now all companies looking for methods/algorithms to lower memory consumption and servers count, because incoming data becomes too big
21:10:26cheatfateand data grows exponentially
21:10:48cheatfateso buying new hardware is not a proper way
21:11:21nivi dont think "all companies" is necessarily true. most of the people i talk to that want to do web stuff are looking for rapid iteration frameworks like node or rails. very few actually use go outside of big companies
21:12:02*bjz joined #nim
21:12:45cheatfateniv, just take screenshot of your opinion, we will talk 2-3 years after this moment about this theme.
21:13:49dom96The big companies have enough resources to write their own web frameworks which scale well
21:14:14nivi'm not going to stand on my opinion in 2-3 years; just saying how things present themselves to me when talking to customers
21:14:23cheatfatebig companies depends on people, and people some times making wrong decisions, like greenlets...
21:16:31federico3cheatfate: what's wrong with greenlets?
21:17:14cheatfatefederico3, its a dead end..
21:17:54Calinouhi
21:18:06CalinouI see a discussion about web frameworks, just as I'm doing Django stuff for learning Python and Django :p
21:18:25Calinoudom96: btw, my internship ends tomorrow, I'll do a final presentation
21:18:36Araqshouldn't you work on our website instead?
21:18:51CalinouAraq: back-end vs front-end :p
21:19:19Araq1. backend means Nim.
21:19:19*libman2 quit (Remote host closed the connection)
21:19:26*libman joined #nim
21:19:27Araq2. frontend is not finished.
21:19:46Calinouactually with dom96, I debated if we create a Nim back-end for the new site, or if we just use Jekyll
21:20:33AraqI will eventually throw out any non-Nim-technologies
21:21:02AraqJekyll doesn't support Nim highlighting, I bet
21:21:22*bjz quit (Ping timeout: 240 seconds)
21:24:38Calinouhighlighting is done using Highlight.js (Rouge lacks Nim highlighting), so client-side
21:25:19Araqmeh, better than nothing but there is no need to do it at runtime with JS
21:25:24Calinouit's better to do it server-side if possible, but since Rouge or Pygments doesn't have Nim highlighting that I know :P
21:25:45AraqPygments has iirc but it's outdated
21:26:42dom96I'm fairly sure that Jekyll supports pygments
21:26:57dom96Performing syntax highlighting on the client side is a bad idea
21:28:11cheatfateomg, maybe we can use PHP/Node/Perl/Python/Crystal/Go/Rust to make Nim's website?
21:28:41cheatfateso you will get jokes on HN about Nim's site which based not on Nim?
21:28:59Araqhow about we get a new website instead?
21:29:08Araqand worry later about how to spread fake news?
21:30:24dom96yeah, because Rust gets tons of jokes because they use Discourse
21:30:25dom96Right?
21:31:00dom96Eating our own dogfood is well and good. But we don't even have the resources to maintain the forum.
21:31:02cheatfatebe patriots use Nim to build back-end :)
21:31:28dom96which I will likely end up having to work on to use the new website design
21:31:36Araqdom96: depends on your definition of "maintain"
21:31:42Araqlast release was recent
21:33:02dom96sure.
21:33:18dom96But how many people are actually using Nim because they are impressed that Nim's forum is itself written in Nim?
21:33:28dom96or that we have an "IDE" written in Nim?
21:33:52dom96I used to think this mattered but it really doesn't
21:34:25cheatfatewhen forum and site got `professional` look this becomes matter, but we need a decent designer
21:34:30Araqsure but I like it this way because I'm a control freak
21:34:57Araqbesides, I had experience with existing forum software
21:35:33Araqand it took spammers a long time to catch up
21:35:46Araqnote that the old PHP based forum was plagued by spam too
21:37:17CalinouDiscourse seems fairly spam-resistent, but it's just me
21:37:22Calinouor maybe all Discourse forums have tons of staff
21:38:21cheatfatewhat the problem to integrate google's recapture?
21:38:40cheatfatewhat the problem to integrate proof of work on post?
21:40:09cheatfatemaybe there only one problem... nobody have time to work on it, or nobody wants to spare time on it
21:40:35Araqcheatfate: new users are moderrated now, problem solved
21:41:02cheatfateAraq, `spam` is not a problem for me :)
21:41:10Araqand again, we suspected the spammers were human beings, you can recapture all you want
21:42:34cheatfateEven people could not calculate many sha256 hashes :)
21:44:53dom96Sadly, back when NimForum came into being Discourse wasn't a thing
21:46:32Araqwhen I compiled nimforum I found a serious codegen regression
21:47:07Araqeating our own dogfood is the only thing that makes Nim usable
21:49:06AraqI'm tired of these discussions really. sure, lets use Discourse and docbook and sphinx and let's write the compiler in Ocaml while we're at it
21:50:06*libman2 joined #nim
21:50:06*libman quit (Remote host closed the connection)
21:50:09dom96I don't want us to move to Discourse
21:50:31dom96But refusing to use tools which already exist and work now is madness
21:57:01Araqsure. but usually there is some disagreement about what "exist and work" means
21:58:33*zetashift quit (Ping timeout: 248 seconds)
21:58:37*libman2 quit (Remote host closed the connection)
21:58:46*yglukhov quit (Remote host closed the connection)
21:58:51*libman joined #nim
21:59:22*yglukhov joined #nim
21:59:36*libman2 joined #nim
21:59:55*libman2 quit (Remote host closed the connection)
22:00:18vlad1777dhello to all =) Why is "discard" statement mandatory ?
22:00:50Araqbecause it improves code quality.
22:00:52*libman quit (Remote host closed the connection)
22:01:15vlad1777ddo you mean readability ?
22:01:21*PMunch joined #nim
22:01:25Araqno, code quality.
22:01:29Araqfewer bugs.
22:01:35vlad1777daha, thanks
22:01:43PMunchSorry Araq, I had to run earlier
22:02:02PMunchI haven't had time to play much with the three-way merge. But it looks promising
22:02:41nivspeaking of code quality, is there a hacky way to break through visibility into a module and access hidden procs (for fuzz testing)?
22:02:52*irrequietus quit ()
22:03:05Araqniv: include instead of import
22:03:25nivuuhhhh. good point.
22:03:41*yglukhov quit (Ping timeout: 255 seconds)
22:13:29*zetashift joined #nim
22:28:39zetashiftwill there be a roadmap of 2017 for Nim?
22:29:33dom96yes, we'll hopefully write one up soon.
22:29:36Araqzetashift: I started with updating the todo.txt
22:30:45*kulelu88 joined #nim
22:35:29PMunchHmm, when creating a proc that takes an object. How can I default that object to nil?
22:35:43PMunchIt just says it just expects the type and not nil..
22:37:44Araqobjects cannot be nil, use a ref object
22:37:54Araqor some other default value
22:38:06PMunchAh, makes sense
22:38:07PMunchThanks
22:40:05*Trustable quit (Remote host closed the connection)
22:52:31*Matthias247 quit (Read error: Connection reset by peer)
22:54:03zetashiftwoop woop!
22:55:29PMunchHmm, what's the syntax for defining a macro that looks like those in Emerald?
22:56:02PMunche.g: tagname(attribute="Hi"):<indented lines with more>
22:56:46Araqmacro tagname(x, y: untyped)
22:56:46*Vladar quit (Quit: Leaving)
22:57:57PMunchHmm
22:58:02PMunchError: type mismatch: got (title: string, void)
22:58:48PMunchhttp://pastebin.com/kBnpnUuX
22:58:53PMunchThat's what I did
23:12:52PMunchDo you know what I did wrong Araq?
23:13:57Araqmacro frame(title, y: untyped): untyped =
23:13:58Araq echo "test"
23:14:00Araq result = title
23:14:02Araqframe(title="Hello"):
23:14:03Araq discard
23:14:37PMunchAh, but I want to support different attributes
23:14:38Araqfor named args to be weak you need varargs[untyped] iirc
23:14:50PMunchOkay
23:15:15Araqyeah varargs is it
23:15:17PMunchSo I can type it out as varargs[untyped] and then traverse it?
23:15:27Araqyes but watch out
23:15:33Araqthe last entry is the passed body
23:15:35PMunchBut can I get the name that was used?
23:15:40Araqyes
23:16:48PMunchHow? The varargs documentation is a bit sparse..
23:18:07FromGitter<Araq> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58853daed43728124e8f2c2c]
23:18:26Araqhmm gitter is just superior
23:18:42PMunchAh, gotcha
23:19:05PMunchI'm actually writing a script ATM that will take my current selection, pipe it through ix and put the link in my clipboard :P
23:21:10Araqbash script?
23:21:23PMunchYup
23:22:00Araqlol. you'll never find all the bugs resulting from weird quoting rules
23:23:21Araqit's not just that this Unix style of development is quite antique. It never worked in the first place. It was just as broken in the 70ies when it was new.
23:28:34PMunchhttp://ix.io/1QMi
23:28:37PMunchSeems to work fine
23:30:38Araqthat's what everybody thought and then they discoverd Shellshock :P
23:30:45*def-pri-pub joined #nim
23:30:45*ftsf_ joined #nim
23:32:22PMunchOh yeah, it definitely has it's quirks :P
23:32:25PMunchDon't get me wrong
23:32:37PMunchBeen tearing my head out from time to time when writing bash scripts
23:33:00AraqI write Nim programs or NimScript instead
23:33:12Araqshorter and type checked
23:33:34PMunchThere are just so many nice little utilities that are easy to call from bash
23:33:46PMunchLike xclip for example which I use in this case
23:34:48PMunchMost of my bash scripts are just stringing together commands with a couple of conditionals and binding the resulting script to a keyboard shortcut
23:35:41enthus1asthas one talked thrift or to hypertable from nim?
23:39:43enthus1astim looking for a "longer term data store" hyptertable looks very kuhl
23:41:08Araqenthus1ast: no but it looked easy to wrap back in the days
23:41:49enthus1asti thought it would good nim training for me to port one of the basic protocols
23:42:25enthus1astbut then i discovered (from a forum post) that they have something like a code generator
23:43:01enthus1astbut thats a little to much for me i guess
23:45:50enthus1astit is wraped already?
23:45:56AraqI doubt it
23:46:17*brson joined #nim
23:49:51Araq"Hypertable, Inc. is Closing its Doors" ouch
23:51:36enthus1astohhh
23:52:18enthus1astthen mongo or postgres ....
23:54:07enthus1astor sleeping
23:55:41Araqit's still an open source project and not dead
23:56:04Araqand we have mongo and postgres wrappers, so go for Hypertable