<< 02-03-2017 >>

00:05:30*vlad1777d quit (Ping timeout: 260 seconds)
00:06:06*couven92 quit (Quit: Client Disconnecting)
00:07:40enthus1astsounds like a fun project piotrklibert
00:09:49dom96nice! awesome project :)
00:12:59*yglukhov quit (Remote host closed the connection)
00:19:07zachcarterbtw all - 7drl starts this weekend in case anyone is interested
00:19:28zachcarterI just finished creating bindings to http://foo.wyrd.name/en:bearlibterminal for Nim if anyone wants them
00:20:09zachcarterI should probably make a thread on the Nim forum - I’ll do that now
00:22:24enthus1asttoo much cool things to try : )
00:27:07*yglukhov joined #nim
00:31:57*yglukhov quit (Ping timeout: 260 seconds)
00:34:18*Snircle quit (Remote host closed the connection)
00:42:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:53:18*kafke joined #nim
01:03:02*yglukhov joined #nim
01:07:25*yglukhov quit (Ping timeout: 260 seconds)
01:50:20*yglukhov joined #nim
01:55:00*yglukhov quit (Ping timeout: 258 seconds)
01:56:38*Kingsquee joined #nim
02:09:59subsetparkzachcarter: I've been working on a Roguelike in Nim!
02:10:08zachcarteroh awesome!
02:10:30zachcarterhave anything to share?
02:10:38*bjz joined #nim
02:10:50zachcarteralso: are you using any libraries or writing everything yourself?
02:11:07zachcartersubsetpark: I’m currently working on a 2d game framework similar to libgdx for Nim
02:11:24subsetparkHonestly, I've just been using ncurses...
02:11:47zachcartermaybe a switch to bearlibterminal is in your future :) or my library when it’s a bit further along
02:11:51subsetparkIt's pretty clunky but I don't know what the state of the art is. This is my first game
02:12:02zachcartervery cool :D
02:12:08zachcarteryou should do 7drl!
02:12:43zachcarterI’m just going to work hard on my game library for 7 days :P
02:13:12subsetparkbearlibterminal looks rather heavy - it provides roguelike output inside of its own graphic buffer, right?
02:13:46zachcarterit uses immmediate mode OpenGL for rendering to my knowledge
02:14:03zachcarterI dug into the source code a bit at one point
02:14:27zachcarterit’s essentially a terminal emulator
02:14:43zachcarterwhich a lot of roguelikes end up using since ncurses is… well ncurses.
02:14:57zachcarterit’s also truecolor to my knowledge
02:15:11subsetparkYes, I think that would feel like a betrayal to me... :) My roguelike origins are firmly in ASCII
02:15:21zachcarteroh you can still do ASCII with it
02:15:33zachcarterit’s meant for ASCII
02:15:40zachcarterit has a interface similar to ncurses
02:15:54subsetparkah ok
02:16:22zachcarterhttps://gist.github.com/zacharycarter/61037bd748633c70d218e2f5e6001c53
02:16:40subsetparkvery neat
02:16:59zachcarterhere’s a screenshot of one of the demos I ported to nim - http://i.imgur.com/apNqlbu.png
02:19:18zachcartersubsetpark: my friend notostraca and I, who maintains squidlib, have been talking about writing something for doing region encoding using bitsets
02:19:31zachcarterregion encoding of on/off information
02:19:43zachcarterin Nim, probably using simd if we can
02:22:33*arnetheduck quit (Ping timeout: 260 seconds)
02:22:45zachcarterI used his havily for my map generator in java :
02:22:56zachcarterhttps://github.com/zacharycarter/mapgen
02:25:56*chemist69 quit (Disconnected by services)
02:26:01*chemist69_ joined #nim
02:26:18*yglukhov joined #nim
02:29:46*Nobabs27 joined #nim
02:30:39*yglukhov quit (Ping timeout: 258 seconds)
02:56:19*Nobabs27 quit (Quit: Leaving)
03:02:13subsetparkYeah definitely seems like I might as well give it a shot...
03:07:50zachcarterif you have any questions I can help you
03:09:10zachcartersubsetpark ^
03:09:31subsetparkAwesome thanks :)
03:10:05zachcarternp!
03:10:11zachcarterI love procgen / roguelikes
03:10:45zachcarterI plan on doing a lot of procgen in my game
03:13:53*yglukhov joined #nim
03:18:33*yglukhov quit (Ping timeout: 260 seconds)
03:31:45*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:38:40*yglukhov joined #nim
03:39:32*jackv quit (Quit: ZNC - 1.6.0 - http://znc.in)
03:41:30*jackv joined #nim
03:43:17*yglukhov quit (Ping timeout: 260 seconds)
03:56:38*brson quit (Quit: leaving)
04:32:47*jabb joined #nim
04:33:00jabbhttp://ideone.com/H6TPVa regarding this. why must i unref the string?
04:41:20*bjz joined #nim
04:57:33zachcarteralmost done with version 1.0 of the public API for these nuklear bindings
05:00:36*BitPuffin|osx quit (Ping timeout: 240 seconds)
05:45:43*Pisuke quit (Read error: Connection reset by peer)
05:46:52*Pisuke joined #nim
05:54:51libmanExcellent zachcarter. Looking forward to finding the time to try them.
05:55:02zachcarterhttps://gist.github.com/zacharycarter/f426e503d15f967e480fb33230273639
05:55:16zachcartereverything is wrapped with a nimian proc now
05:55:25zachcarterI still have to fix return types to not be int32 and bools instead
05:55:53zachcarterlibman: I’ve been using them in my own project, they’ve been working well
05:57:52*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:58:14zachcarterhopefully someone can help with portng over some more examples from nuklear
06:09:49*shashlick quit (Ping timeout: 260 seconds)
06:10:17*shashlick joined #nim
06:33:26*Lord_Nightmare joined #nim
06:45:19*nsf joined #nim
07:03:18zachcarteror whoever wrote tables :P
07:08:58zachcarterwhoops wrong chat haha
07:16:17*ofelas quit (Remote host closed the connection)
07:16:34*ofelas joined #nim
07:43:35*abeaumont quit (Ping timeout: 264 seconds)
08:17:02*zachcarter quit (Quit: zachcarter)
08:17:22*rokups joined #nim
08:27:46*Andris_zbx joined #nim
08:40:55*libman quit (Quit: Connection closed for inactivity)
09:02:44*PMunch joined #nim
09:16:41*Arrrr joined #nim
09:16:41*Arrrr quit (Changing host)
09:16:41*Arrrr joined #nim
09:21:33*Vladar joined #nim
09:22:43*yglukhov joined #nim
09:36:04*vendethiel joined #nim
09:36:29*couven92 joined #nim
09:47:18*bjz joined #nim
10:16:01*GustavoLapasta joined #nim
10:27:52*libman joined #nim
10:42:04*yglukhov quit (Remote host closed the connection)
10:46:09*yglukhov joined #nim
10:54:14*yglukhov quit (Remote host closed the connection)
10:56:12*bjz_ joined #nim
10:58:13*bjz quit (Ping timeout: 260 seconds)
10:58:56*yglukhov joined #nim
11:00:25*yglukhov_ joined #nim
11:03:09*yglukhov quit (Ping timeout: 240 seconds)
11:04:45*yglukhov_ quit (Ping timeout: 260 seconds)
11:05:09*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
11:09:44*yglukhov joined #nim
11:16:41PMunchI'm trying to work with xlib and when getting the value from the WM_CLASS atom I get "two consecutive null terminated strings"
11:16:48PMunchI also get the length of the total data
11:17:06PMunchObviously when I cast this to a Nim string I get the first of the two strings
11:17:26PMunchAnd it's length is obviously lower than the total length of the data
11:17:42PMunchBut I'm struggling to get the second string
11:17:48PMunchs2 = $(cast[cstring](classPtr+(s1.len)))
11:18:04PMunchTried that but to no avail, I get a Illegal storage access error when I try to run it
11:18:20PMunchSame if I just try to get the second character by doing cast[char](cast[ptr cuchar](classPtr+1)[])
11:18:55PMunchGetting the first character with cast[char](classPtr[]) works fine
11:21:21Araqhmm seems ugly, but correct
11:24:37*ofelas quit (Read error: Connection reset by peer)
11:24:49PMunchHmm, now I'm trying to copy it into an array
11:25:11*ofelas joined #nim
11:27:30PMunchhttp://ix.io/nSB
11:27:35PMunchWhy doesn't that work?
11:27:56PMunchIt just prints a bunch of newlines
11:31:05PMunchNever mind, it was to,from; not from,to
11:36:38*yglukhov quit (Remote host closed the connection)
11:37:50*yglukhov joined #nim
11:41:51PMunchHmm, it really doesn't like to access the middle of a memory address
11:41:58PMunchcopyMem(characters.addr,cast[ptr cuchar](classPtr+s1.len),classLen) also fails
11:44:52PMunchhttp://ix.io/nSF that works, but it is limited to the length you define for your array..
11:49:47PMunchhttp://ix.io/nSG arguably still a hack but that also works and is not as limited
11:50:16*GustavoLapasta quit (Quit: Leaving)
11:51:37PMunchhttp://ix.io/nSH less of a hack, but still a bit annoying that I just can't get the offset directly
11:55:12PMunchAha! This: http://ix.io/nSL works. So it seems that I just couldn't add to a pointer directly, but casting it to an int, add to it, then cast it back to a ptr works
12:00:46*yglukhov quit (Remote host closed the connection)
12:02:26*yglukhov joined #nim
12:02:29*yglukhov quit (Remote host closed the connection)
12:02:30*Snircle joined #nim
12:04:57*yglukhov joined #nim
12:07:38*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:10:14*Ven joined #nim
12:10:23*bjz joined #nim
12:10:50Araqyeah but I assumed you had an overloaded + for this :P
12:11:04*elrood joined #nim
12:11:10Araqhow can it crash and not compile at the same time?
12:12:17PMunchAh, no I was just using the regular +. And all the above code compiles
12:12:23PMunchJust crashes when I run it
12:12:38AraqclassPtr+s1.len is not valid Nim code
12:12:45Araqwhat is classPtr's type?
12:12:51PMunchptr cuchar
12:14:06PMunchecho classPtr+5
12:14:07AraqError: type mismatch: got (ptr cuchar, int)
12:14:07Araqbut expected one of:
12:14:07Araqproc `+`(x, y: float32): float32
12:14:09Araq
12:14:10PMunchThat compiles and runs fine
12:14:43Araqvar classPtr: ptr cuchar
12:14:43Araqecho classPtr + 5
12:14:49Araqdoesn't compile here
12:15:15PMunchThis is with {.experimental.} and I have a bunch of converters. But none of them from "ptr cuchar"
12:15:28PMunchhttp://ix.io/nSO <- converters
12:15:35Araq.experimental does auto deref for you :P
12:15:47PMunchAah
12:16:03PMunchOh yeah, without it I get a compilation error
12:16:15PMunchI'm using it for wxWidgets
12:16:39AraqI see. too bad I can't see a good solution for this problem
12:17:26PMunchThe best "fix" would probably be to rewrite the wxWidgets wrapper
12:17:33PMunchOr rather to write an abstraction layer
12:17:44AraqC++ interop pretty much requires .experimental
12:17:56Araqbecause of the 'this' pointer mess
12:20:17PMunchWhat's the alternative?
12:20:26PMunchAfter all my wxWidgets code is generated from my macro
12:20:39PMunchSo I could build it into the macro
12:21:21Araqperhaps. but this feature of .experimental should become the default too
12:21:57Araqso the problem that 'ptr cuint + number' compiles persists
12:25:24PMunchHmm, then it's an issue
12:25:48PMunchMaybe define a + for ptr and numbers?
12:26:11PMunchOr wait, that would blur the line for what intPtr+5 did
12:26:32*zachcarter joined #nim
12:27:24zachcartermorning all - I was introducing Nim to a buddy last night and he pointed out some inconsistencies in Nim that I didn’t have answers to
12:29:06zachcarterwhy is there like <literal>.newSomething and <literal>.toSomething, specifically in the tables module when these patterns aren’t present throughout the rest of Nim? usually a ref is created with the new keyword
12:29:56zachcarteror addr
12:30:04krux02well yea, there are inconsistencies
12:30:12krux02I realized it on my own
12:30:30krux02but that is something I even introduced in my own code without knowing it
12:31:05zachcarteryeah I know it’s easy to do, I think he was more wondering just - why like is there any underlying reason or is it something that has just occurred in the language and is it going to be addressed at any point?
12:31:13krux02in C++ I had the convention, to add methods toSomething to a class,
12:31:28krux02a newSomething fits in more for a free function
12:31:57krux02and without really realizing it, I just applied it to nim
12:32:01zachcarterah okay
12:32:26krux02but there I can interchange methods (meaning dot call syntax) and free functions arbitrarily
12:32:33zachcarterright
12:32:34PMunchProbably (hopefully) going to be addressed at some point
12:32:37krux02I changed a few times and wonder what is better
12:32:41FromGitter<dom96> No underlying reason, just an inconsistency. It should be renamed to initTable.
12:32:54PMunchThere have been mentions of renaming stuff in the standard library
12:33:05FromGitter<dom96> Well, maybe Araq has a reason
12:33:13FromGitter<dom96> But I am not aware of one
12:33:27zachcarterokay cool - I’ll let him know thank you for the explanation guys :D
12:33:34krux02dom96 not sure if initTable is better, because init is usually used to initialize an object that is already allocated, where new and create also allocate it
12:33:53zachcarterI think a table literal would be nice
12:34:32Araq{"key": "value"}.toTable() ?
12:34:41zachcarterthat’s the inconsistency we’re talking about Araq
12:34:50zachcarterwhy the need for toTable?
12:35:05zachcarteror newTable
12:35:18Araqbecause there is the problem of ordered vs unordered tables
12:35:31Araqif you do it like Python, you copy Python's big mistake
12:35:43krux02what does python do?
12:35:46zachcarterI hadn’t thought / considered this
12:36:22Araqwe don't copy other's mistakes, we make completely new mistakes in Nim :-)
12:36:31zachcarter:P
12:37:04Araqok, so the question is why 'toTable' and not 'initTable'
12:37:11krux02well there is also the way how c++ can do things
12:37:14zachcarterhere was his question
12:37:19zachcarterverabtim in IRC last night
12:37:33zachcarterjab: {"haha": "bar"} seems to be syntactic sugar for [("haha": "bar")]
12:37:33zachcarter[01:35am] jab: which is just an array
12:37:35zachcarter[01:35am] jab: i'm seeing some inconsistencies
12:37:36zachcarter[01:35am] jab: <literal>.newSomething
12:37:38zachcarter[01:36am] jab: <literal>.toSomething
12:37:39zachcarter[01:36am] jab: and then all the new, etc keywords to create references
12:37:40zachcarter[01:36am] jab: TableRef/Table
12:37:41zachcarter[01:36am] jab: vs SomeObj, Some
12:37:51*Ven quit (Ping timeout: 258 seconds)
12:38:11krux02I personally think the definition of TableRef is completely redundant
12:38:16zachcarterthis spawned these questions
12:38:17zachcarterjab: why not just a real literal for table?
12:38:18zachcarter[01:38am] jab: and is newFoobar a common theme
12:38:19zachcarter[01:39am] jab: and when should i use the naming pair: Foo/FooObj vs FooRef/Foo
12:38:40krux02ref Table is one character more, and it has the advantage that it does not need to be defined
12:38:56zachcarterfor the last question I pointed him to - https://nim-lang.org/docs/nep1.html
12:38:57Araqwell you cannot be "consistent" if the problem domain forces you to do the 'ref object' vs 'object' tradeoff
12:39:12*yglukhov quit (Remote host closed the connection)
12:39:14Araqthe semantics are not "consistent" to begin with.
12:39:28Araqso it would be a mistake to conflate these two too much, IMO.
12:40:10*Ven joined #nim
12:40:29*BitPuffin|osx joined #nim
12:41:00Araqso the question is why is toTable not called initTable? because I think of it more as a type conversion than a type construction.
12:41:19Araqbut I suppose you're right and it's pointlessly inconsistent.
12:42:23*tankfeeder joined #nim
12:43:17*yglukhov joined #nim
12:43:21flyxwell in C++ a constructor is by default an implicit type conversion. not saying that C++ does anything right.
12:43:48flyxthere seems to be little difference between the two.
12:43:59Araqyeah but that's just nuts and you have to type 'explicit' to avoid it
12:44:06*yglukhov quit (Read error: Connection reset by peer)
12:44:24krux02flyx only when it has exactly one argument and does not have an ``explicit`` tag
12:44:32*yglukhov joined #nim
12:44:34flyxI know the details.
12:44:52krux02what I do like is the initializer list
12:45:01flyxjust wanted to point out that conversion vs construction is blurry
12:45:16Araqyeah, excellent point.
12:45:17krux02and that would map pretty well to openArray in Nim
12:45:17flyxbecause in fact, you always construct a new copy
12:45:52*yglukhov quit (Read error: Connection reset by peer)
12:45:54zachcartergood point flyx
12:46:01krux02proc table[Key,Value](openArray[tuple[Key,Value]])
12:46:11*yglukhov joined #nim
12:46:41flyxkrux02: well that's almost what toTable() does
12:47:02flyxor, rather, exactly
12:47:39krux02yes, I just think the to prefix should be avoided at all
12:47:48krux02the package is called tables
12:47:52krux02the type is called Table
12:48:00krux02so table is a nice way to construct it
12:48:07krux02it also looks more declarative
12:48:32Araqit should also look expensive because it is :P
12:48:48zachcarter$table
12:48:54zachcarter$$$table
12:49:03flyxheh
12:49:11Araqthat said, I don't think I use toTable anywhere in my code
12:49:26zachcarterI don’t either - I think he was just digging for things to poke at in the language
12:49:29krux02flx: oh yea, you are right XD
12:49:31Araqif I use a table, I don't know its contents
12:49:51Araqso why would the "default" constructor be burdened with a rare use case
12:50:41*yglukhov quit (Ping timeout: 260 seconds)
12:51:23zachcarterthe only time I ever desire hash table literals is when I’m defining lookup tables
12:51:57Araqif we keep the initTable and newTable (and we should) the overloading makes sense since toTable only works with Table and not with TableRef, right?
12:52:23Araqso that would be an argument to change toTable to use the same names
12:53:16Araqzachcarter: I use arrays or a case statement when I know things at compiletime, I uses tables when I don't know it at compiletime
12:53:36Araqbut then I very rarely have some "partial knowledge" of my key, value pairs
12:53:50Araqso toTable is mostly useless :-)
12:53:58zachcarterlike for instance
12:54:12FromGitter<dom96> The reason that toTable should be called initTable is because we have two newTable procedures.
12:54:25FromGitter<dom96> We don't have a toTableRef
12:55:21Araqdom96: agreed.
12:55:57zachcarteractually nevermind, I don’t really have any cases at the moment where I’m using tables like that
12:56:04FromGitter<dom96> Hrm, I guess I should change ``newTable`` in my Nim reference to ``initTable``
12:56:36FromGitter<dom96> @Araq: glad you agree :)
12:56:49zachcarterhe had another question
12:57:05zachcarterhttp://ideone.com/H6TPVa
12:57:09krux02well the tables litteral, even though it is acutally a rare use case in real code, it is very important in the process to learn how tables work
12:57:24zachcarterI pointed him to the last bit of - https://nim-lang.org/docs/gc.html
12:57:37krux02throw away code that is just written to try out the hevariour of tables is full of toTable([...])
12:57:39zachcarternot sure if I was correct in doing so
12:58:03*yglukhov joined #nim
12:58:34zachcarterjab: i have a ptr type with a member to GC
12:58:34zachcarter[11:32pm] jab: i free the ptr, i can see why the reference is untraced so i need to manually remove it BUT, why isn't it freed in the first place?
12:58:51zachcarterI was thinking his use of alloc0 ?
13:00:39krux02what is with alloc0?
13:00:55*libman quit (Quit: Connection closed for inactivity)
13:00:59Araqptr type with GC member requires an unpaired GC_unref() call, not sure our docs cover that -.-
13:01:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:01:11*yglukhov quit (Remote host closed the connection)
13:01:15krux02it can be replaced with ``create``, but that doesn't clear what he is trying to say
13:01:19AraqI'm also not sure that is tested
13:01:23*yglukhov joined #nim
13:01:31krux02zachcarter, what is the problem with that code, and what is it supposed to do?
13:01:51Araqin general ptr type to GC'ed memory is *rare* and once I thought the compiler should warn about this combination
13:01:54zachcarter# tell the GC that the string is not needed anymore: not sure why????
13:01:54zachcarterGCunref(d.s)
13:02:03zachcarterwondering why the GCunref is necessary
13:02:19zachcartergotcha thank you Araq
13:02:35Araqactually.
13:02:37*Arrrr quit (Ping timeout: 240 seconds)
13:02:41AraqI think this part of the manual is wrong.
13:02:48Araqthanks for pointing it out.
13:03:01zachcarterI’ll forward your thanks onto jab
13:03:13zachcarterI’ve been trying to get him in here… he’s west coast US so time zones don’t exactly marry up wel
13:03:16zachcarterwell*
13:03:17Araqactually the GC_unref needs to be paired
13:03:21Araqwith GC_ref
13:03:28zachcarterokay
13:03:29Araqfor this example to work.
13:04:10*yglukhov quit (Remote host closed the connection)
13:04:44Araqbbl
13:04:50krux02well ten hours difference for me
13:06:58zachcarteryeah exactly :
13:07:47krux02Araq: Would you accept a pull request, that allows setLen to work on nil strings/seq types as long as the the default of seq/string vars is still nil?
13:08:44krux02setLen is rarely called, therefore for performance it hardly makes a difference
13:09:44krux02it would just render the proc newSeq(var self; len: int) redundant
13:10:35*yglukhov joined #nim
13:19:14FromGitter<endragor> `s.setLen(n)` crashing when `s` is `nil` makes more sense to me than silently doing nothing
13:20:06krux02endragor: I am not talking about silently doing nothing, I am talking about to create a new seq of that lenth
13:20:53krux02http://ix.io/nSV
13:22:55*yglukhov quit (Remote host closed the connection)
13:23:15*yglukhov joined #nim
13:24:05FromGitter<endragor> ah, alright. I wouldn't mind that, unless there were reasons not to do that from the beginning. the `nil` case was thought out given that the doc explicitly mentions you shouldn't use setLen on `nil`.
13:26:26*yglukhov quit (Remote host closed the connection)
13:30:10*arnetheduck joined #nim
13:31:01*yglukhov joined #nim
13:32:55krux02yes but that's inconsisten, because len on nil actually does work
13:34:04FromGitter<dom96> What's next? ``add`` on ``nil`` should also allocate a new string/seq for us?
13:34:06krux02http://ix.io/nSW
13:35:08FromGitter<dom96> I don't think that `len` should work on `nil` in the first place.
13:35:26FromGitter<andreaferretti> I think it should :-)
13:36:04FromGitter<dom96> Why?
13:36:05FromGitter<andreaferretti> and arguably `add` on nil should allocate
13:36:15FromGitter<andreaferretti> because people are going to introduce errors
13:36:16krux02I think nil on seq shouldn't be a thing in the first place
13:36:22FromGitter<andreaferretti> I agree
13:36:26FromGitter<andreaferretti> but since it is
13:36:32FromGitter<andreaferretti> we'd better treat it without crashing
13:36:52FromGitter<dom96> You should have the discipline to initialise your seq/strings instead of relying on these workarounds.
13:37:11FromGitter<andreaferretti> ah well, I do
13:37:12FromGitter<dom96> Which are just plain confusing a lot of the time.
13:37:18*yglukhov quit (Remote host closed the connection)
13:37:19flyxwell wasn't the plan to make `not nil` default anyway?
13:37:22FromGitter<andreaferretti> but it is a safety for the cases when people don't
13:37:26FromGitter<andreaferretti> including me of course
13:37:35FromGitter<andreaferretti> safety ne
13:37:37FromGitter<andreaferretti> net
13:37:49krux02flyx: yes, but it isn't yet
13:37:52FromGitter<dom96> It's better to crash and fix the bug than silently "work" and have a bug later in your program.
13:38:08FromGitter<dom96> (Which is harder to find)
13:38:09krux02and for me "not yet" is a bit too far away in the future
13:38:12FromGitter<andreaferretti> that may also be a valid position
13:38:27flyxI side with dom96 on this one.
13:38:43krux02dom96: well no
13:38:58FromGitter<dom96> flyx: yay :)
13:39:19krux02dom96: the idea is that setLen is exalcly that, a perfect initialization
13:40:25*libman joined #nim
13:40:45krux02I have serialization/deserialization code, and whenever I deserialize data into an object, I have to always put the branch in there:
13:41:16krux02is s not nil: s.setLen(n) else: s.newSeq(n)
13:42:07krux02all the time I write into a seq, I have to put this branch
13:42:21FromGitter<dom96> So why don't you refactor that into a function?
13:42:47krux02because it should also work with an object that already exists, becaues it is semantically an assignment of serial data to an object
13:42:58krux02dom96: I did
13:43:05krux02I posted it
13:43:10krux02http://ix.io/nSW
13:43:26krux02sorry wrong one
13:43:37krux02http://ix.io/nSV
13:45:19krux02dom96: on the other hand what is the problem with when things just work?
13:46:01FromGitter<dom96> The problem is that this introduces a major inconsistency.
13:46:19FromGitter<dom96> Either we treat every ``nil`` transparently
13:46:23FromGitter<dom96> or we don't treat any
13:46:40FromGitter<endragor> ref types with value semantics already introduce a major inconsistency :-P
13:46:59FromGitter<dom96> Right now we are moving towards a situation where you have to remember that `len` will give you "0" when your seq is nil
13:47:24FromGitter<endragor> so some people are preferring to go towards "value" part of the seq/string semantics
13:47:39FromGitter<dom96> @endragor example?
13:47:44FromGitter<endragor> example of what?
13:47:49FromGitter<endragor> I mean the current discussion
13:48:10krux02well I like to treat my seq like an std::vector, empty by default
13:48:47krux02and I personally don't see the problem to treat nil as the general empty seq
13:49:27FromGitter<dom96> @endragor example of "ref types with value semantics", I guess you're saying that sequences have value semantics?
13:49:28krux02an endragor already pointed out, seq is a ref type with value semantics
13:49:51krux02and it doesn't make sense to have value semantic where you constantly have to check if something is nil or not
13:50:13FromGitter<dom96> What value semantics do seqs have?
13:50:22krux02copy on assignment
13:51:31krux02http://ix.io/nT0
13:52:50*yglukhov joined #nim
13:53:47*hjsagg quit (Ping timeout: 264 seconds)
13:53:57krux02http://ix.io/nT1
13:55:24krux02also treading nil just like an empty sequence is how the stb library works
13:56:01krux02https://github.com/nothings/stb/blob/master/stretchy_buffer.h
13:57:47krux02the entire thing fits in 70 lines of well readable C code
13:59:10krux02ok well readable is an exaggeration, but it is very well structured
14:00:18*Salewski joined #nim
14:00:41krux02dom96: do you have a use case, where you would want setLen to crash?
14:00:49krux02(when it is nil)
14:03:42SalewskiShort streams module question:
14:03:51Salewskiimport streams
14:03:57Salewskivar s = newStringStream()
14:04:08Salewskis.write("aa bb cc dd"); s.setPosition(3) ;s.write("xx")
14:04:12Salewskiecho s.data; s.close
14:04:20Salewski# output is "aa xx cc dd" # Is it possible to get "aa xx", something like s.setLen() ?
14:04:27Salewskidone.
14:05:14flyxSalewski: well you can do setLen on s.data, but that would invalidate the pos
14:05:34*hjsagg joined #nim
14:05:45SalewskiYes, that was my fear!
14:06:03krux02dom96: took me 5 minutes to find an example in the compiler, wher the setLen that works on nil would simplify the code
14:06:57flyxSalewski: write a proc cut(s: StringStream, at: int) = s.setPosition(at); s.data.setLen(at)
14:08:01Salewskiflyx: OK, thanks. I was not sure if that would work, but I will try it.
14:08:20flyxSalewski: I am also not sure that it will work ;)
14:08:29FromGitter<dom96> krux2: I don't have a use case, I just don't want to end up confused just like I have been a couple of times because of 'len's new behaviour.
14:08:47FromGitter<dom96> If anything maybe we should initialise all sequences/strings when they are defined?
14:09:38FromGitter<dom96> To be honest, I have more of an issue with len's behaviour because I use it for debugging a lot.
14:10:16*yglukhov quit (Remote host closed the connection)
14:10:44krux02dom96: I wrote some gdb scripts that embed in Nim that tell you all you need to know about a seq when you print it
14:11:05*yglukhov joined #nim
14:12:39*yglukhov quit (Remote host closed the connection)
14:12:53*yglukhov joined #nim
14:13:43krux02it just has some problems, because I can not write a regular expression to detect sequence types
14:17:25FromGitter<dom96> I still primarily use ``echo`` for debugging
14:24:39*tankfeeder quit (Quit: Leaving)
14:24:41*yglukhov quit (Remote host closed the connection)
14:25:05*yglukhov joined #nim
14:26:12*yglukhov quit (Remote host closed the connection)
14:26:41*hjsagg quit (Ping timeout: 246 seconds)
14:27:21*yglukhov joined #nim
14:29:33*Salewski left #nim (#nim)
14:31:25krux02dom96: do you do it, because debugging with gdb just doesn't work well enough?
14:31:57*yglukhov quit (Ping timeout: 260 seconds)
14:33:13Araqkrux02: it never does for me and that's not because debuggers don't work.
14:33:20Araqer, I mean
14:33:30Araqand that's because debuggers don't work.
14:33:59Araqmy programs fail at the Nth iteration, not at the first iteration.
14:34:31Araqso this means I need conditional breakpoints. these are slow and you have to type them without intellisense
14:35:33Araqit's code you type that is essentially free of tooling. no intellisense, no version control
14:36:23Araqso I insert 'if's into my code, not only 'echos'
14:36:39Araqand avoid debuggers.
14:38:01Araqit's very nice when you can attach a debugger later, to program that is about to crash / crashed :-)
14:38:27cheatfateAraq, you can but on windows only
14:38:35cheatfatejust in time debugger
14:39:38*rauss joined #nim
14:39:57FromGitter<andreaferretti> you can in smalltalk as well :-)
14:40:22Araqor debuggers that support "go back in time", that's useful too.
14:40:57Araqbut usually not available.
14:41:17Araqtried "undo GDB" once, never got it to work
14:41:45Araq(no "go back in time" doesn't mean to go back one assembler instruction...)
14:49:53krux02cheatfate: you can attach gdb to running programs as well
14:50:20krux02Araq: I use debuggers for much simpler things
14:50:40krux02I use them to understand how code executes
14:50:55krux02I want to visualize how the code executes and where it executes
14:51:02krux02I want to see how it changes variables
14:51:09krux02just to understand how code that I did not write works
14:51:51krux02but that's just a horrible experience with command line debuggers like gdb
14:53:39krux02and in visual debuggers it is hard in Nim, because most of them don't understand Nim at all
14:54:34krux02Araq: what's do you think is the safest way to detect, if a type in GDB is a sequence type
14:55:01krux02currently all I have is a regular experssion on the name "^TY_.*$"
14:55:20krux02but that doesn't really work
14:56:39krux02easiest for me would it be, when seq types had a tag in them, like "TY_seq_<hash>", then I could just add that to the regular expression
14:57:24*hjsagg joined #nim
14:57:40cheatfatekrux02, but gdb can expand appropriate C type, so you can use this to get if this sequence or not?
14:58:48Araqkrux02: patch the codegen then?
14:59:05Araqmost codegen patches improve Nim's debugging support these days :-)
14:59:30cheatfateAraq, bad joke :)
14:59:47cheatfatename mangling don't improve debugging :)
15:00:20Araqname mangling is required for correctness, C doesn't support overloading or namespaces
15:00:22krux02Araq: so you would be open to change the generated Name?
15:00:29Araqkrux02: yeah
15:00:48krux02ok, I get it.
15:01:22cheatfateAraq, and what happens if i declare type like mysuperseq[T] = seq[T]
15:01:26krux02I won't send any pull request unless I actually have gdb support that actually also uses it
15:02:11krux02weatfate: unless it is ``distinct`` it should not do anything different than seq[T] would generate
15:02:14*yglukhov joined #nim
15:02:39krux02cheatfate: sorry for spelling your name incorrectly
15:03:15cheatfateso if distinct is specified, then this way with regexp of "TY_seq_<hash>" is broken?
15:03:39Araqno, it's not broken. the codegen removes 'distinct'
15:05:12cheatfateanyway i think its better to make dependency on generated C type.
15:05:18cheatfatenot on name of type
15:06:45*yglukhov quit (Ping timeout: 260 seconds)
15:07:22Araqfor enums and sets we need additional debugging info, the compiler has some (disabled) code for that
15:10:10*xet7 joined #nim
15:12:33cheatfateAraq, and now you need to generate better `syms` file :)
15:13:00cheatfateto include support for enums and sets :)
15:13:21cheatfatei told you `line format` is not a good way to doing it :)
15:14:59Araqyou also told me to use a binary file format that nobody can parse without an API.
15:15:06Araq:P
15:15:24federico3is there the "dual" of varargs? foo(i[0], i[1], i[2].....)
15:16:19FromGitter<andreaferretti> I am working on a slightly old program which used asynchttpclient
15:16:39FromGitter<andreaferretti> it seems that a certain point, `response.body` changed from synchronous to asynchronous
15:16:52FromGitter<andreaferretti> does anyone know when did this happen?
15:16:55FromGitter<andreaferretti> more or less
15:17:02Araqwas a recent commit
15:17:12FromGitter<andreaferretti> after 0.16.2?
15:17:17Araqmost recent commit to asynchttpclient
15:17:24FromGitter<andreaferretti> ok thank you
15:17:26Araqthere is no 0.16.2
15:17:28FromGitter<andreaferretti> I will have a look
15:17:30FromGitter<andreaferretti> uh
15:17:42FromGitter<andreaferretti> you're right
15:17:51FromGitter<andreaferretti> I was sure we were on 0.16.3
15:17:55FromGitter<andreaferretti> go figure
15:18:04Araqyeah it's a tough problem, this change means we need to either revert it
15:18:10Araqor call it 0.17.0
15:18:25subsetpark.17 makes the language sound more mature :)
15:18:55Araqsubsetpark: we follow the tick-tock model of development though
15:19:03subsetparkoh yeah true
15:19:04Araqat least that's what I'm trying to do.
15:19:10subsetparkok, 0.18.0 it is, agreedb
15:19:14Araqno lol
15:19:32Araqrelease with breaking changes, patch release
15:19:39subsetparki'll submit to hacker news "Nim 0.18.0 released" and link to the GH repo
15:19:44Araqand then again release with breaking changes, patch release
15:20:51Araqthere is however another bugfix that means old code stopped working.
15:21:13Araqthe compiler got stricter with its effect system in combination with methods.
15:23:45PMunchI remember there was a way to jump out of nested for loops in Nim, but I've forgotten how I did it. Anyone?
15:24:41*hjsagg quit (Ping timeout: 268 seconds)
15:27:10Araqblock foo: ... break foo
15:27:19FromGitter<andreaferretti> one more thing
15:27:32FromGitter<andreaferretti> I see there are a few shared data structures
15:27:36FromGitter<andreaferretti> sharedtable
15:27:40FromGitter<andreaferretti> and others
15:28:00FromGitter<andreaferretti> how do they work? do they allocate on the shared heap? are they threadsafe?
15:28:13Araqyes and yes
15:28:15*vlad1777d joined #nim
15:28:39FromGitter<andreaferretti> great!
15:28:50FromGitter<andreaferretti> why didn't I know?
15:28:57FromGitter<andreaferretti> they seem not to be mentioned anywhere
15:29:02*abeaumont joined #nim
15:30:26*zama quit (Quit: leaving)
15:32:27*zama joined #nim
15:34:41*yglukhov joined #nim
15:36:10cheatfateandreaferretti: we have only sharedtable... which is really slow
15:37:36krux02locking shared data is slow
15:37:53FromGitter<andreaferretti> and sharedqueue I think?
15:38:53*nsf quit (Quit: WeeChat 1.7)
15:38:53FromGitter<andreaferretti> and sharedlist and sharedstring
15:39:14cheatfatewe dont have sharedqueue
15:39:33FromGitter<andreaferretti> I see... but I think it used to be there
15:39:40FromGitter<andreaferretti> I saw it a few days ago
15:39:51cheatfatesharedlist and sharedstring of course uses same one lock algorithm
15:40:01cheatfatethe only fast thing we have is lockfreehash
15:40:32cheatfatebut i never tested it
15:40:35krux02There should be a substitute for the Go channel
15:40:56krux02and that should be the shared queue
15:41:06Araqagreed but I cannot do everything
15:41:22Araqit also needs to support async events
15:41:22krux02ok, understood
15:41:58Araqthough I'm a fan of dataflow variables
15:42:23krux02what is a dataflow variable
15:48:20Araqa simple datastructure, you can write to it once and read from it as often as you like
15:48:36Araqreading blocks until the value is available
15:48:57cheatfateAraq, and this variable not uses lock?
15:49:02Araqno dataraces possible, deadlocks are deterministic
15:49:25Araqcheatfate: it does use a lock and condition variable under the hood
15:49:47Araqits value lies in its simplicity and safety.
15:50:04cheatfateso dataflow variable in array is pretty expensive?
15:51:25Araqyes. but you can use an array of "dataflow arrays"
15:51:53Araqthe wrapped value doesn't have to be an atom, it can be an array
15:51:58cheatfatethen this becomes `lock striping`
15:52:01Araqyes
15:53:55*mrPerro joined #nim
16:00:38krux02I know that datastructure from Scala where it is called Future
16:00:57krux02but it's everywhere
16:01:11krux02I just didn't the the name dataflow variable
16:01:36*abeaumont quit (Ping timeout: 240 seconds)
16:02:15AraqFutures are more powerful and less safe
16:02:41Araqusually you can wait for Future 1 or 2 and then you introduce nondeterminism
16:02:42krux02let file : Future[MyType] = future(parseFile("filename"))
16:03:04krux02how?
16:03:15Araqawait foo or bar
16:04:03krux02and? then?
16:04:31Araqthen you introduced non deterministic behaviour.
16:04:50krux02I am not sure what your await structure essentially means
16:05:06krux02does it mean it waits for one of them?
16:05:10AraqNim's async await statement, for instance
16:05:22Araqyes, it means it waits for the 'or'
16:05:29krux02ah, ok I haven't used that one yet
16:06:32Araqwith strict dataflow variables you can't do it, you can only do read(foo) and then read(bar)
16:06:33krux02ok, but isn't or always immediate?
16:07:20krux02I did not understand your await example, it does not have read
16:07:35krux02is both foo and bar a future?
16:07:48krux02and if yes, whot does it mean to have an or of a future?
16:08:12*PMunch quit (Quit: leaving)
16:08:19Araqdon't get lost in the details.
16:08:52krux02Well I did not do a lot with futures, I just made file loading async
16:09:07Araqmy point is: when the system allows for "wait for whatever comes first" then you introduced non-deterministic behaviour.
16:09:25elroodyou could introduce a feature to check whether a dataflow variable access would block, to make futures and dfv likely powerful and safe ;)
16:10:02krux02well yea it is nondeterministic, but but that is also the point of it, isn't it?
16:10:22Araqyes, and it's the point of a dfv to not allow this :P
16:10:41*Sembei joined #nim
16:11:05krux02ok
16:12:07krux02But I think scala's future are exactly what you call a dfv.
16:12:20krux02I don't think they support wait for whatever comes first
16:12:38krux02at least not when I programmed scala (in 2010)
16:16:24*SusWombat joined #nim
16:16:36*arnetheduck quit (Ping timeout: 240 seconds)
16:17:52Araqoh alright
16:33:36*Sembei quit (Ping timeout: 258 seconds)
16:39:37*vlad1777d quit (Ping timeout: 240 seconds)
16:41:40*vlad1777d joined #nim
16:52:24*brson joined #nim
16:56:46*Andris_zbx quit (Remote host closed the connection)
16:57:46*Sembei joined #nim
17:04:21SusWombatHey guys i did discover nim yesterday and browsed the forums aswell. There was a discussion about the autocomplete not really working. Is this problem now solved?
17:12:59Calinouhi SusWombat :)
17:13:11SusWombatCalinou, Hi!
17:13:15CalinouSusWombat: usually, autocomplete works best in Visual Studio Code with the Nim add-on installed
17:13:25Calinou(VSCode is likely to be the best editor for doing Nim right now)
17:13:32Calinou(it's a very good editor for other languages too)
17:13:44SusWombatWell id prefer emacs but yeah vsc is fine
17:14:16SusWombatCalinou, now that i see you in here i kinda want nim bindings in godot :D
17:20:12*nsf joined #nim
17:22:01*kafke quit ()
17:28:46*Arrrr joined #nim
17:33:20*Nobabs27 joined #nim
17:36:18Calinouyeah, me too
17:42:12*rokups quit (Quit: Connection closed for inactivity)
17:43:21enthus1astgodot looks kuhl
17:44:00dom96Calinou: hey, any chance you could have a go at fixing that issue you saw on my version of the new website?
17:45:00dom96(or give me pointers on how to do it? I'm a noob at pure grids)
17:52:17enthus1astdom96: is the new website "mobile friendly"?
17:52:33Calinouenthus1ast: yes, it is
17:56:31*Trustable joined #nim
17:58:09Calinoudom96: the navbar fix is literally 1-line, if you want to keep a fixed navbar on all displays
17:58:17CalinouI'll see if I can make it fixed only on mobile devices, if that's your preference
17:58:32dom96Calinou: I'd rather not have it fixed anywhere
17:58:47dom96But I can live with it only on mobile
17:59:03dom96The issue I am referring to is aligning the menu to the right properly
17:59:10Calinounon-fixed navbars don't make for good user experience on mobile, I find, because if you want to go to a page, you need to scroll all the way up
17:59:53*hjsagg joined #nim
17:59:56dom96Yeah, I can understand that.
18:00:12dom96So yeah, I'm happy with a fixed navbar on mobile.
18:00:27Calinounow, I made the navbar fixed on mobile, but static on desktop
18:00:46CalinouI'll look into the alignment issue
18:01:32*yglukhov quit (Remote host closed the connection)
18:02:02dom96thanks
18:04:23*Sembei quit (Ping timeout: 256 seconds)
18:06:20jabbis there any way to avoid having to implement functions on an object for ref Object and var Object?
18:06:50jabbi see a common pattern in the stdlib is to just have a private Impl proc
18:08:07dom96jabb: If you need reference semantics then you should use 'ref Object' exclusively
18:08:22Calinouwhoa, I broke something in Firefox but not in Chromium
18:11:09*yglukhov joined #nim
18:11:45Calinouok, fixed it in Firefox and Chromium
18:11:52CalinouI'm on Linux so I can't test Edge right now, will do later
18:11:58Calinoudom96: can I commit it to your branch?
18:12:03dom96Calinou: sure.
18:12:05Calinouthen merge the branch into master, if it's good to go
18:12:24dom96No worries about Edge, we can run it through browsershots at the end (or whatever the popular service for that is nowadays)
18:12:42dom96Feel free to merge into master. I will continue working inside that branch though
18:12:49dom96There is still a lot to do
18:14:01*odc_ joined #nim
18:15:14Calinoubrowserstack is probably the service you're thinking about, they offer free licenses for open source developers I think :)
18:15:29*yglukhov quit (Ping timeout: 240 seconds)
18:15:41dom96Nope, http://browsershots.org/.
18:15:46dom96I used it in the good old days
18:16:43*odc_ is now known as odc
18:17:22Calinoudom96: what's the merge strategy we use? Merge commits, squash and merge, or rebase?
18:17:30dom96merge
18:17:34Calinoumerge commits?
18:18:57dom96yeah
18:19:05dom96no squashing and no rebasing
18:19:10Calinouok
18:19:28*yglukhov joined #nim
18:19:29dom96Squashing in some circumstances (if it really is just a little change made over many commits)
18:20:10jabbCalinou, so anyone who wants to create the object on the stack will have to create a ref to call that proc
18:20:13jabb?
18:20:55jabburm, wait. my questio is ref and var both have "ref" semantics
18:21:24jabbhttps://github.com/nim-lang/Nim/blob/master/lib/pure/collections/tables.nim#L121 here are two procs that have var Table, and ref Table
18:21:33jabbis there a way to avoid this duplication?
18:22:06jabbthey're semantically the same. one just takes a reference to a stack object
18:23:30dom96jabb: was that question directed at me?
18:23:40jabbanyone bwahaha
18:23:41Calinouok, merged to master
18:23:53Calinouthis is the first time I do branch merges using Git CLI, forgive me if I did something wrong :p
18:23:58*yglukhov quit (Ping timeout: 240 seconds)
18:24:16Calinoufollowed this: http://stackoverflow.com/questions/5423517/how-do-i-push-a-local-git-branch-to-master-branch-in-the-remote/5434370#5434370
18:24:29CalinouI don't work with branches that often, I hope it's right
18:24:53dom96jabb: You might be able to write: proc clear[A,B](t: var Table[A, B] | TableRef[A,B]) = ...
18:25:53dom96Calinou: Looks good :)
18:26:06jabbvar Table and TableRef are semantically the same. so it's weird there isn't an mechanism to encapsulate both
18:26:09Calinouok :)
18:26:38dom96Calinou: ProTip: A good way to check is by looking here: https://github.com/nim-lang/website/branches (if something went wrong then you wouldn't see '0|0')
18:27:06Xedid the nim site finally get moved out of the main repo?
18:27:23dom96Xe: the new site is being developed in a new repo :)
18:27:48Calinouit's just a prototype (made using Jekyll) for now
18:28:44dom96jabb: hrm, perhaps, although I have a feeling that there are some differences in semantics
18:28:52Xedom96: nice, gonna be great to see nim2017
18:31:53jabbdom96: the difference, in c++ terms, seems to be a one a pointer, the other is a reference
18:32:51jabbin c++, however, you don't have to deal with unified call syntax meddling with what functions can be called if a type is a ref, ptr, etc
18:33:30jabbgo solves this with whatever you call the function with, it will be "morphed" into a reference or a value appropriately
18:33:49FromGitter<piotrklibert> @jabb about the ref and var types, I ran into this at some point and out of curiosity tried something like this: ⏎ ⏎ proc fT: ref SomeType | var SomeType (arg: T): t = ... ⏎ ⏎ and it seemed to work ok. But in the end I didn't need it. [https://gitter.im/nim-lang/Nim?at=58b8658cde5049082238c3d4]
18:35:02jabbwhy didn;t you need it?
18:36:02FromGitter<piotrklibert> Also, `type T = ref SomeType | var SomeType` also compiled and worked :)
18:36:25jabbthey will have different assignment semantics
18:37:47FromGitter<piotrklibert> Ah, it was in the interpreter, about the object which held interpreter state. I allocated it once at the start and didn't need to allocate another one during runtime, so I settled for `var TclContext` everywhere.
18:38:39jabbthat's application specific it sounds like, for a library maintainer you will have to cover both bases right?
18:38:49*Ven quit (Ping timeout: 260 seconds)
18:40:59*Ven joined #nim
18:43:29FromGitter<piotrklibert> It looks like it, looking at the collections/tables.nim at least.
18:44:08*abeaumont joined #nim
18:46:24demi-python used to be my go-to language for writing something quick and messy but now it is starting to be nim; which is exceptionally nice tbh
18:50:20federico3is there the "dual" of varargs? foo(i[0], i[1], i[2].....)
18:55:00federico3perhaps https://forum.nim-lang.org/t/1186#7312
18:57:46SusWombatHey guys :) I want to learn nim to use it to prototype a game using sdl2. Now my problem is there are 2 wrappers/bindings. Can anyone give me some input on which to use? (im also new to sdl)
18:58:09*Amun_Ra quit (Remote host closed the connection)
18:58:43*yglukhov joined #nim
18:58:52*Amun_Ra joined #nim
18:59:46ldleworkerWe should start an icon challenge in #nim-offtopic if you get the boilerplate going
19:02:34*Matthias247 joined #nim
19:03:05*yglukhov quit (Ping timeout: 260 seconds)
19:11:56Araqjabb: you can have 'var T' and use .experimental to get auto-deref on the first arg. but that can have surprsing results as zachcarter has shown us recently :-)
19:20:44*yglukhov joined #nim
19:21:10*couven92 quit (Read error: Connection reset by peer)
19:23:58*Ven quit (Ping timeout: 240 seconds)
19:27:12*Ven joined #nim
19:31:51dom96SusWombat: This one is in the Nim-lang org so it's technically supported by us (nim devs) officially. https://github.com/nim-lang/sdl2
19:32:03SusWombatdom96, ok thanks
19:32:06*BitPuffin|osx quit (Ping timeout: 240 seconds)
19:32:37*scriptum joined #nim
19:35:28*abeaumont quit (Ping timeout: 240 seconds)
19:44:03VladarSusWombat: and sdl2_nim is supported by me, has nice docs https://vladar4.github.io/sdl2_nim/ and a WIP game engine ;-) https://github.com/Vladar4/nimgame2
19:47:26dom96Vladar: Why the decision to write your own? :)
19:48:26*bjz joined #nim
19:48:41Vladardom96: I started it before there was official available
19:49:06dom96Vladar: oh. Our bad heh
19:49:12dom96I wonder if we could merge our efforts.
19:50:23demi-yglukhov: any plans to update this (https://github.com/yglukhov/plists) to support binary plists? :)
19:51:10yglukhovdemi-: not really. but prs are welcome ;)
19:51:16demi-:(
19:52:21zachcarterSusWombat: I’m also working on a cross-platform 2d | 3d game library ala libgdx for Nim, but it’s no wher enear ready for production
19:52:52zachcarterno where*
19:53:32SusWombatok thanks guys!
19:53:34zachcarterbut if you have any questions about sdl2 stuff I’m happy to help
19:54:10dom96It's awesome to see so many people using Nim for games
19:54:23zachcarterdom96: agreed
19:54:36Vladardom96: well two wrappers aren't so different, but sources structure is, and some structures too, like {.union.} for events
19:54:39FromGitter<barcharcraz> yeah it's really started to gain momentium in the last few months
19:55:37Vladarplus full documentation, of course
20:01:13dom96well, I dunno. I'm not the primary user of either of these.
20:01:26dom96yglukhov: you use the official one right? Any thoughts?
20:04:15*BitPuffin|osx joined #nim
20:13:43yglukhovdom96: dont really care. i use official because (a) its ok and (b) i can contribute to it in case it doesnt. no offense but i find it a (a) waste of time and (b) bad for nim ecosystem to provide several instances of pretty much the same thing. of course the "primary" maintainers should be accepting enough to encourage contribution. i really think that is the main mistake of D which didnt let it evolve when there was good time for it.
20:14:01*rauss quit (Ping timeout: 260 seconds)
20:14:33dom96yglukhov: I agree, which is why I would like for Vladar's and nim-lang's repos to be merged.
20:15:16*nsf quit (Quit: WeeChat 1.7)
20:15:42yglukhovto even more outline this point of view, i have transfered ownership of my jnim repo to vegansk. because some time ago he told me he was working on the same thing but more advanced, so i thought it would be good to shut down my lib and start working together on a new one
20:16:01*rauss joined #nim
20:19:46*Arrrr quit (Read error: Connection reset by peer)
20:20:25dom96that's brilliant :)
20:21:26federico3can I detect if header is present at compile time and add a flag to the linker accordingly?
20:22:28yglukhovfederico3: linker doesnt make use of headers. whats the relation?
20:22:48FromGitter<barcharcraz> well a specific header may require some linker flag
20:23:01FromGitter<barcharcraz> if you are to actually use it
20:23:16yglukhovjust the fact that it exists doesnt imply it is used
20:23:22yglukhov=)
20:23:58*Ven quit (Ping timeout: 240 seconds)
20:24:04federico3I need to pass -lsystemd to gcc :)
20:24:08yglukhovbut yeah, you can refer to file system in compile-time, so it should be possible. also you can execute other programs.
20:24:31*babs_ joined #nim
20:24:51yglukhovfederico3: so why not to check for libsystemd existance?
20:24:54dom96I asked this a couple of days ago but didn't get any replies: anyone remember who managed to embed DLLs inside an exe and get the application to run? They created a macro for this not too long ago, but I can't remember who it was :\
20:25:10FromGitter<barcharcraz> there was a security paper on it
20:25:28FromGitter<barcharcraz> it's not hard if you want to just extract them on first run and then run the exe
20:25:39FromGitter<barcharcraz> if you want to actually LOAD the dlls from memory it's quite hard
20:25:45FromGitter<barcharcraz> not impossible
20:25:56FromGitter<barcharcraz> but very system dependent and fickle
20:26:07FromGitter<barcharcraz> you essentially have to rewrite much of the dynamic loader
20:26:16federico3yglukhov: I'm not sure where I can do the check and how to add that flag dynamically
20:26:29FromGitter<barcharcraz> let me see if I can find the paper dom96
20:27:03Araqdom96: zachcarter iirc
20:27:06dom96barcharcraz: probably not too difficult, but somebody here managed to do it so it would be much easier to just copy their code :)
20:27:15FromGitter<barcharcraz> https://github.com/fancycode/MemoryModule
20:27:23*Nobabs27 quit (Ping timeout: 264 seconds)
20:27:30FromGitter<barcharcraz> it's a good way to avoid your dll being scanned by security programs
20:27:32*Ven joined #nim
20:27:41yglukhovfederico3: take a look at https://github.com/yglukhov/linktools
20:27:56zachcarterwasn’t me
20:28:01dom96My motivation is to avoid having to deal with static libraries on Windows. It seems much easier to embed a DLL inside the exe.
20:28:02zachcarternot sure who it was
20:28:09federico3yglukhov: very nice
20:28:21dom96And I might even end up doing the same thing on macOS
20:28:33zachcarterit would be nice
20:28:38FromGitter<barcharcraz> I mean static libs do work on windows
20:28:49yglukhovnimble install it; and then just: when libHasSymbol("mylib", "mySymbol"): {.passL: "mylib".}
20:28:57yglukhovfederico3 *
20:28:59dom96I guess I'll need to look through the IRC logs to find it
20:29:05Araqdom96: I would avoid it
20:29:10dom96Araq: why?
20:29:30FromGitter<barcharcraz> it will cause problems with anti-malware and various security things
20:29:39FromGitter<barcharcraz> for one thing
20:29:48Araqit might have unforeseen consequences
20:29:59Araqbetter use an exe packer
20:30:02Araqlet's see
20:30:05FromGitter<barcharcraz> http://www.harmonysecurity.com/files/HS-P005_ReflectiveDllInjection.pdf
20:30:27dom96but static linking is such a PITA :\
20:30:50FromGitter<barcharcraz> I used to static link my nim execs
20:30:53demi-static linking is terrible :(
20:31:48dom96I will need to link openssl and gzip at least
20:31:58dom96And I bet I will need to compile them manually
20:32:30federico3staticlinking openssl in? ouch
20:32:37FromGitter<barcharcraz> it can be done
20:32:42FromGitter<barcharcraz> I think I have done it
20:32:46FromGitter<barcharcraz> but yeah
20:32:49FromGitter<barcharcraz> it's not fun at all
20:32:59*xet7 quit (Quit: Leaving)
20:32:59yglukhovwere doing it for android and ios
20:33:07FromGitter<barcharcraz> vcpkg has recipies to build static versions on windows
20:33:16FromGitter<barcharcraz> I think
20:33:39federico3dom96: do you really need SSL to bootstrap the compiler? ;)
20:33:54dom96federico3: Yes, in order to download the compiler.
20:35:16federico3dom96: can the compiler downloaded over http instead? The "shim" can contain the checksum of the version is going to pull
20:35:49FromGitter<barcharcraz> I know curl for one can use winssl, mbedtls and many others
20:35:53*xet7 joined #nim
20:35:54FromGitter<barcharcraz> that are all easier to build on windows
20:36:07FromGitter<barcharcraz> winssl is not really "trusted" but it depends on your thread model
20:36:20dom96federico3: It could be... but I also want to support builds from GitHub
20:36:20*Sembei joined #nim
20:36:59*BitPuffin|osx quit (Ping timeout: 264 seconds)
20:37:00FromGitter<barcharcraz> mbedtls would very likely be easier to deal with
20:37:04FromGitter<barcharcraz> on windows at least
20:37:09FromGitter<barcharcraz> I'm not sure about mobile
20:37:14federico3dom96: if it's only a shim it can first download nim+nimble
20:37:17dom96I think I might just risk unforeseen circumstances with the embedding of DLLs
20:37:27yglukhovwhy not use winapi to download? or even better, use winapi to implement sslcontext. or even more better, implement ssl in nim! =)
20:37:41federico3like tripping antivirus checks?
20:37:47dom96yglukhov: I would love to, all of that would take far too much time.
20:37:49FromGitter<barcharcraz> yglukhov: Nobody really trusts secure channel
20:38:15federico3ssl in nim, hey!?
20:38:22FromGitter<barcharcraz> plz no
20:38:47Araqdom96: http://superuser.com/questions/42788/is-it-possible-to-execute-a-file-after-extraction-from-a-7-zip-self-extracting-a
20:39:12Araqit's rather complex to setup but at least it's all command line and so can be automated
20:39:42Araqand it might work on other OSes too with 7z, but not sure
20:39:59FromGitter<barcharcraz> trying to directly embed dlls may just get you straight up immediately blocked by some antivirus software
20:40:27dom96Hrm, go's tls module is only like 300 LOC https://golang.org/src/crypto/tls/tls.go
20:40:43dom96But I bet there are other modules that are larger
20:40:51demi-huh
20:41:00dom96(which it depends on)
20:41:08federico3dom96: but the crypto is implemented externally
20:43:00Araqthere is even a youtube video of how to do that: https://www.youtube.com/watch?v=Gh7JDNT-Luc
20:45:05*couven92 joined #nim
20:46:20Araqhttp://7zip.bugaco.com/7zip/MANUAL/switches/sfx.htm
20:46:33*babs__ joined #nim
20:46:48Araq^ use this and if you're stuck, try something else. but try this first.
20:47:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:47:27dom96I dunno.
20:47:37dom96It seems to me like this would have similar problems with AVs
20:48:10AraqAVs can deal better with this than with custom solutions.
20:48:36*babs_ quit (Ping timeout: 240 seconds)
20:48:40dom96ok, well, we've got a couple of options in any case.
20:48:55Araqplus offering the same as a .zip file is easy enough when you setup 7z already
20:49:42Araqshow some respect, I spent some time researching these things -.- for Nim's installer.
20:50:51federico3yglukhov: oh, I can do {.passL: "...".}
20:51:57dom96Araq: I appreciate your help!
20:58:07*kulelu88 joined #nim
20:59:17*shashlick quit (Ping timeout: 260 seconds)
20:59:23*Trustable quit (Remote host closed the connection)
21:00:06*shashlick joined #nim
21:00:09cheatfatejust to clarify, if AV will signal on dll loaded in memory, this AV must be notified because it bug
21:00:36*yglukhov quit (Remote host closed the connection)
21:00:43cheatfatenothing except VirtualAlloc/VirtualFree/VirtualProtect is used
21:01:01cheatfateand usage of this functions is absolutely legal
21:01:15cheatfateexe packers using same technology
21:02:34cheatfatethe main problem is how AV detects exe packed files is calculating entropy of compressed/crypted binary
21:03:04cheatfateso you need to stay with not high entropy in finish exe file
21:03:15cheatfateso you can avoid AV
21:03:40cheatfateeven warnings
21:04:09*BitPuffin|osx joined #nim
21:05:03*rauss quit (Quit: WeeChat 1.7)
21:05:12cheatfateabout about 7z self extracting archive, first of all if you need to avoid AV, you can sign it...
21:05:23FromGitter<barcharcraz> that is a good point
21:05:33cheatfatebut anyway most AV can unpack self extracted 7z archives
21:05:52cheatfateand check executables stored inside
21:06:08*hjsagg quit (Quit: No Ping reply in 180 seconds.)
21:06:09cheatfateso there will be no warnings, until you dont crypt your 7z file
21:06:27*brson quit (Quit: leaving)
21:06:50*bjz joined #nim
21:07:01cheatfatebut anyway windows users dont like to run `.exe` files downloaded from net.
21:07:20cheatfatebut they agree to run `.msi` signed installers
21:07:25FromGitter<barcharcraz> yes, it's loading dll's direct from memory that may cause problems. Probably not with windows defender and friends but rather with more intrusive "security" software
21:08:01cheatfatebarcharcraz: this is not true, just because such loading is common scheme
21:08:19FromGitter<barcharcraz> [citation needed]
21:08:30FromGitter<barcharcraz> I know the dll ends up mapped to memory
21:08:57FromGitter<barcharcraz> but bypassing the normal loader and search mechanism (kernel32) is not something I've seen much
21:09:43*hjsagg joined #nim
21:09:47cheatfatebarcharcraz: virtualalloc, virtualfree, virtualprotect - its common scheme?
21:10:50cheatfatememory access in your process memory space is common scheme?
21:12:42dom96Would an AV complain about an exe writing a DLL to the hard drive and then loading it?
21:13:29FromGitter<barcharcraz> probably not
21:14:04FromGitter<barcharcraz> and yeah cheatfate, but messing with your own image header is pretty strange
21:14:06ldleworkerdom96: lol
21:15:08cheatfatedom96, of course it can
21:16:20dom96Well, in the sense that an AV can complain about anything, right? But is it likely to complain?
21:16:41cheatfatebarcharcraz: no modifications will be made to own image header, you even dont need to modify EPROCESS structure in runtime
21:17:28elrooddom96, don't you think your utilities and installers should look as trustworthy and rock-solid as possible? dll-embedding is nice as a proof-of-concept experiment, but it definitely isn't something one should consider using for basic tools in the context of a new-ish and unestablished language
21:18:04cheatfateAV works like score meter, so `drop unsigned dll and load it to memory` its like 50 points, but `drop signed DLL and load it to memory` is like 5 points
21:18:24elroodbesides, statically embedding dlls is like cherry-picking the worst of both worlds, and this may-an-av-complain-or-may-it-not-pseudophilosophical discussion is not leading anyone anywhere
21:18:51dom96elrood: I do. But I also want to lower the barrier to entry as much as possible for newcomers.
21:19:19*bjz quit (Read error: Connection reset by peer)
21:19:23dom96Perhaps I am going too far and I should just give them a zip with an .exe and some DLLs
21:19:27elroodif something looks fishy, people will drop it like a hot potato, which is not something you'd want for nim's tools, and especially not for newcomers
21:19:56cheatfateif you want to distribute binary for windows, first you need to get certificate, and then you need to make `.msi` installer...
21:20:01ldleworker"Think C#"
21:20:11ldleworkerhas been by advice for Nim from the start
21:20:34ldleworker(As in, highly polished and nothing seems out of place or grinds inoperatively against any other part, etc etc)
21:21:43krux02cheatfate: so basically windows is a closed system now.
21:22:06FromGitter<barcharcraz> code signing is not a bad thing
21:22:28FromGitter<barcharcraz> and you don't need it, but it makes you look legit
21:22:47FromGitter<barcharcraz> and makes it easier to use nim for security related thigns
21:23:00FromGitter<barcharcraz> bagh fingers are hard
21:23:03FromGitter<barcharcraz> hard to spell
21:23:52krux02yea, I was just excaggerationg
21:24:02krux02exaggerating
21:24:18krux02also hard to spell
21:24:35FromGitter<barcharcraz> eggseggseggsetrating
21:25:02krux02yea
21:25:50krux02I am on Linux, if I would be forced to develop something on Windows, I would be most happy, when I can install Nim via msys2 (probably becaues of my Arch linux background)
21:25:53dom96Yeah... I won't bother with certificates. For now at least.
21:26:06dom96Unless it's a barrier to the software working.
21:26:10krux02(if have no idea if it actually exists)
21:26:23dom96Which I guess Windows' smart screen (or whatever it's called) might cause.
21:27:48krux02well, I think the best certificate to be, is open source software.
21:27:49dom96I wonder if the Rust guys distribute rustup as a single exe for Windows
21:28:01krux02And a lot of "smart" people think the same way
21:28:13krux02so yea I agree, don't bother too much about certificates
21:28:16dom96I know that on macOS it can be grabbed by copying and pasting a single command (which itself isn't the safest thing in the world...)
21:28:19krux02that is for closed source software
21:28:52demi-dom96: hm?
21:29:19federico3krux02: however various distros have multiple layers of signatures
21:30:13dom96demi-: curl https://sh.rustup.rs -sSf | sh
21:30:29demi-oh, ew
21:30:35krux02what I mean is, when windows tells me that Software X is not trusted code, but software X has full sourcecode published on the internet, then I say, ok then I can take the risk, but when it is a software that is completely closed, I might not take the risk
21:30:38demi-curl-to-shell is awful
21:30:45dom96perhaps, but it's oh-so-convenient
21:31:02elrooddom96, quite frankly, if i was a newly introduced to nim and was presented with an installer which as its first action would try to connect to the net and download and run a bunch of stuff, i'd be less than delighted
21:31:32elroodmozilla can get away with it, being a trusted company, but nim? i'd turn my back in an instant, and probably a lot of people feel the same way
21:31:41dom96elrood: really? :(
21:32:03dom96That sucks. But keep in mind that this would be just one way to install Nim
21:32:14elroodi know it's convenient for you, but i'd really think twice about providing a batteries-included package for the newcomers instead of what you are considering
21:32:35dom96And I would do my best to explain what the exe does
21:32:43*brson joined #nim
21:32:43ldleworkerI think you're being hyperbolic and catastrophizing, elrood
21:33:12ldleworkerI mean the language you're using is obviously intending to illustrate your concern in the most severe sense imaginable
21:33:30elroodi don't think so, but i appreciate your opinion
21:33:37ldleworkerLots of software today connects to the internet and downloads the actual content of the installer, not just "trusted corporations" like mozilla
21:33:39krux02I think Nim should be distributed with a processing like IDE (aporia for now should do it)
21:35:00cheatfatekrux02, Aporia is NOT IDE
21:35:09krux02I should stop being part of this discussion, because I have absolutely no idea of the current state of Nim on Windows, but I guess the best batteries included package would be a setup that downloads the componets that you can select in a checklist.
21:35:46dom96Actually, our current Windows installer (which is broken btw) downloads things from the net.
21:35:47krux02cheatfate: well it does the job of letting the user quickly play around with Nim
21:36:16cheatfatekrux02, php & python distros don't have even editor bundled...
21:36:21ldleworkerdom96: the vast majority of users will turn their backs!
21:36:29ldleworkerSeems like a thing you could instrument.
21:36:47ldleworkerHow many downloads resulted in requests to fetch the data? How many times was the data fully fetched?
21:37:06krux02cheatfate: yes, but they are php and python they don't need to attract newcomers anymore, python is taught at universities
21:37:38cheatfatekrux02, but they dont have editors inside from the beginning...
21:37:46*Sembei quit (Ping timeout: 268 seconds)
21:38:00krux02cheatfate: well python had idle in the past
21:38:24krux02well it actually still has idle
21:38:31krux02just tested it
21:38:31dom96ldleworker: You mean I should look at the analytics?
21:38:48ldleworkerYeah to vet elrood's fear unknowing and doubt
21:39:08ldleworkerkrux02, idle is seen as a joke
21:39:12ldleworkerbecause it is
21:39:13cheatfateif we are talking about python windows distribution i dont see any `idle.exe`
21:39:34Araqonce 0.17.0 is out, Nim's windows distribution is excellent, all things considered, IMHO.
21:39:37*brson quit (Ping timeout: 268 seconds)
21:40:39elroodwhile i do find ldleworker's sarcasm slightly amusing and don't take it the wrong way, i'd really consider making the installers for such basic tools as a compiler and package manager look legit and trust-instilling as a primary goal
21:40:41krux02well idle did not stand the test of time, and when nim does become popular and bundles aporia in the current state, then yea it could become a joke too. But that is not the point.
21:40:43cheatfatethere can be many installers for windows, pure nim, pure nim + mingw bundled, pure nim + mingw + pcre + sqlite3 + openssl bundled
21:41:12FromGitter<barcharcraz> can confirm nim's windows distribution is quite good
21:41:14krux02ceatfate: it should be just one installer with checkboxes (imho)
21:41:18ldleworkerstanding the test of time means that you were at some point fully functional
21:41:23FromGitter<barcharcraz> and working with nim on windows is even better
21:41:24ldleworkerIDLE never was
21:41:44krux02well, I have no idea
21:41:44cheatfatekrux02, stop breaking my nickname, please
21:41:46ldleworkerWhich is no surprise given an editor has no place in such a distribution
21:41:58FromGitter<barcharcraz> it is idle.pyw not idle.exe
21:42:07FromGitter<barcharcraz> hence why you don't see idle.exe
21:42:15krux02cheatfate: sorry
21:43:38krux02and it is somewhat required, because nobody wants an interactive shell in windows cmd.exe
21:44:02krux02or at least was, I don't know if something has changed in that respect
21:44:08dom96elrood: I'm glad you don't take it the wrong way. FWIW it was nice to hear your thoughts so please don't be discouraged from giving your honest opinion.
21:46:23dom96elrood: in the long-run trust-instilling is the goal. In the short-term I don't want anyone to be prevented from using Nim because they can't get it to work on Windows.
21:47:17dom96I remember when I was hunting for a new programming language, thinking "omg, how come everything is so broken, nobody seems to care about these things. I bet I would do better"
21:47:25dom96As a teenager that is easy to think :)
21:47:49dom96Back then Nim was actually one of the best on Windows
21:48:07Xekrux02: type the first few letters and hit tab
21:49:11*mrPerro quit (Quit: Leaving)
21:49:20krux02Xe, just tested. Found a new feature.
21:49:41Xekrux02: the same thing works in most command line shells
21:51:07elrooddom96, and it probably still is. Araq's proposal of using a proven approach with a 7zip self-extracting archive has its charm, as does a .msi - i just wouldn't get too experimental with first-impression tools at this stage
21:55:15*GaveUp quit (Ping timeout: 276 seconds)
21:56:42dom96Sure, and I will try that.
21:56:55dom96.msi would be more of a replacement for our installer.
21:57:17dom96We've used inno and NSIS. Both turned out crap.
21:57:25dom96I sorta doubt that msi is any better :)
21:57:47FromGitter<barcharcraz> .msi is the "official" installer format
21:57:49XeNSYS is the worst parts of assembly, javascript and C combined with the false promises of Oracle Java
21:57:58FromGitter<barcharcraz> intended to replace NSIS and inno
21:58:02FromGitter<barcharcraz> which cam before afaik
21:58:05FromGitter<barcharcraz> *came
22:03:27*Lord_Nightmare quit (Ping timeout: 240 seconds)
22:03:46elroodactually, we found NSIS to be quite malleable and while not necessarily pleasant at least adequate for its limited job back in the day, i am kind of surprised you found it unusable
22:04:47elroodassuming it or its successor hasn't become substantially worse in the meantime, it's been some years, that is
22:08:54*Lord_Nightmare joined #nim
22:09:45Araqelrood: the problem is it hasn't kept up with newer Windows versions
22:12:21elroodah, i see, a pity. after winamp's decline nullsoft probably had little incentive to keep maintaining it
22:18:40*xet7 quit (Quit: Leaving)
22:19:27dom96I have a sort of nostalgic respect for nullsoft
22:19:41dom96But yeah, NSIS has become rather obsolete
22:23:18euantorShould just distribute floppy disks with the binaries on
22:23:34euantorSeems like Windows installer technology hasn't moved on much since then
22:23:44FromGitter<barcharcraz> well msi happened
22:23:55FromGitter<barcharcraz> MS decided to make a standard format
22:24:00FromGitter<barcharcraz> fairly simple, but standard
22:24:17euantorTrue, unfortunately a lot of companies have other ideas
22:24:34euantorLike exe downloads that you download in order to download some other stuff
22:25:04euantorcase: see microsoft office
22:25:07FromGitter<barcharcraz> *cough* adobe *cough*
22:25:18FromGitter<barcharcraz> OK but that does some cool stuff
22:25:20dom96I had this thought that for v1 we should create a Delphi-styled CD box for Nim :)
22:25:24FromGitter<barcharcraz> like office actually streams the application
22:26:09*GaveUp joined #nim
22:26:24euantorIt looks like Microsoft are pushing users towards UWP these days anyway, and in the future it'll be possible to only install apps from the Microsoft Store
22:26:28elroodyou think CDs will still be a thing when nim reaches 1.0 status? ;)
22:26:32enthus1astor the old bsd logos/arts
22:26:56dom96elrood: hah
22:28:04enthus1astwhats the issue with nsis?
22:28:33enthus1astIt seems that its downloading stuff and adds things to the path?
22:28:50enthus1astwhat else do you want?
22:29:16dom96elrood: I guess it'll be one of these: https://youtu.be/8PVeLqWnaXk?t=13
22:30:01dom96Can't wait to upload the Nim compiler to my brain.
22:30:53dom96enthus1ast: It doesn't handle UAC properly.
22:31:12dom96enthus1ast: And cannot download from our new SSL website
22:31:41enthus1astoh
22:31:58enthus1astthats bad
22:32:16FromGitter<barcharcraz> huh
22:32:21FromGitter<barcharcraz> manifest it
22:32:25FromGitter<barcharcraz> that will fix uac
22:32:39FromGitter<barcharcraz> or just use msi
22:36:50dom96Well, since this is pretty much NIH central, I was thinking about developing a NSIS replacement in Nim :P
22:37:25enthus1astyeah me to
22:38:12dom96If done well I think it might even be Nim's killer library.
22:39:43elroodmhm, take a language with focus on performant native code and elegance, and make an installer library its killer application ;P
22:40:51enthus1astin fact it would be an installer only for windows
22:40:59enthus1astand windows has msi
22:41:11enthus1astthe rest has others
22:41:24Araqenthus1ast: the NSIS installer does not work!
22:41:38Araqinstalling to c:\program files silently fails
22:41:51Araqdownloads don't work anymore because we moved to https
22:41:52dom96Nim's focus is metaprogramming. Nim's expressiveness would be perfect for defining installers.
22:42:19dom96Other ideas for a killer app are of course welcome :)
22:43:33*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:44:22elroodan AI for inventing roundishly shaped objects that'd ease transportation and relocation problems would be nice.. ;)
22:45:28enthus1astmonitor/control multiple servers in a self forming network
22:45:46enthus1astso me as a admin only need to doubleclick
22:46:54enthus1astmix of chef / pupped / saltstack / tinc
22:47:14elroodthat's neglecting that a crucial part of being and admin is to make yourself indispensable, though
22:47:45enthus1asti thing the crucial part is that i dont have "really" work
22:47:49enthus1astat work
22:48:48elroodwhich only works until HR calls one in for a casual interview
22:49:34enthus1astmime.nim
22:59:07*couven92 quit (Quit: Client Disconnecting)
23:05:22*abeaumont joined #nim
23:05:57SusWombatCan i debug nim code?
23:06:25CalinouI think you can use basic gdb features, but I'm not sure
23:07:07*Vladar quit (Quit: Leaving)
23:07:15SusWombatok
23:14:47*aedigix- quit (Ping timeout: 264 seconds)
23:24:24*aedigix joined #nim
23:25:32*nsf joined #nim
23:27:23*abeaumont quit (Ping timeout: 256 seconds)
23:28:15*elrood quit (Quit: Leaving)
23:28:29*Kingsquee joined #nim
23:29:22XeSusWombat: why wouldn't you be able to?
23:29:45SusWombatXe, im completely new. So i didnt know if there is a debugger or something
23:30:35XeSusWombat: compile with `--debugger:native`
23:31:40SusWombatwhat does that do Xe
23:32:37Xe --debugger:native|endb use native debugger (gdb) | ENDB (experimental)
23:32:47Xeread the manual if in doubt
23:32:52SusWombatok ty
23:33:05Xehttps://nim-lang.org/docs/manual.html
23:33:11Xekeep this tab pinned
23:33:20Xeit'll help you so much it's not funny
23:36:30SusWombatok
23:41:55*vlad1777d quit (Quit: Leaving)
23:45:36*hjsagg quit (Ping timeout: 240 seconds)
23:47:26*brson joined #nim
23:48:41*hjsagg joined #nim
23:51:43*client_ joined #nim
23:51:43*ofelas quit (Read error: Connection reset by peer)
23:52:10*ofelas joined #nim
23:52:24AraqXe: interesting. the manual, not the index or some stdlib reference?
23:52:59*hjsagg quit (Ping timeout: 246 seconds)
23:54:45*kulelu88 quit (Ping timeout: 260 seconds)
23:57:06XeAraq: i use the manual and work out from there into stdlib docs
23:57:23Xei work in multiple languages so i usually keep the spec for each language up in a tab
23:58:26Xeit also explains the command line flags
23:58:51Xe(which is where i look first when things go contrary to what i think they should, nim is pretty good about being easy to guess
23:58:55Xe)
23:59:32Araqno it doesn't list command line flags
23:59:57Araqthat would be https://nim-lang.org/docs/nimc.html