<< 06-08-2017 >>

00:13:29vivushow much impact does the nim survey have on the community?
00:14:37FromGitter<TiberiumN> ehm? maybe " how much impact Nim community survey have on nim?"
00:23:46demi-dom96: is there any way i could install choosenim non-interactively?
00:33:21def-pri-pubzacharycarter: I think I may have asked this before, but is there an outline for the development of zengine?
00:38:54FromGitter<zacharycarter> def-pri-pub: nothing beyond what I have in my head which is get it to a state where it can be used for making a game
00:38:58FromGitter<zacharycarter> do you have some ideas?
00:41:00def-pri-pubeh, more general ideas for Nim that don't really exist, that would mainly help with game develompent, but useful for other things.
00:42:06FromGitter<zacharycarter> I gotcha
00:42:25dom96demi-: yes, take a look at what the .sh script does
00:42:28FromGitter<zacharycarter> I think zengine needs examples
00:42:44FromGitter<zacharycarter> because it can most likely do a lot of what raylib can already
00:45:09def-pri-pubE.g. I don't think there's a really good geometry & maths library out there.
00:45:35FromGitter<zacharycarter> true
01:00:17*Sentreen quit (Quit: WeeChat 1.6)
01:01:23*Sentreen joined #nim
01:06:44*chemist69 quit (Ping timeout: 246 seconds)
01:06:52*Sentreen quit (Ping timeout: 260 seconds)
01:07:21def-pri-pubThat's something I really want to do... If only I didn't have so many interests and so little free time....
01:19:45*Sentreen joined #nim
01:20:29*chemist69 joined #nim
01:27:40*vivus quit (Quit: Leaving)
01:32:24FromGitter<zacharycarter> I know what you mean
01:32:30FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/FVzR/Screen-Shot-2017-08-05-at-9.32.04-PM.png)
01:39:16def-pri-pubFresh update of stb_image package done: https://gitlab.com/define-private-public/stb_image-Nim/tags/1.4
01:39:33def-pri-pubUpdates to the latest stb_image headers (which includes JPEG saving)!
01:42:02FromGitter<zacharycarter> nice!
01:59:10FromGitter<singularperturbation> Lots of work still to be done, but using multiple threads for tests does seem to speed things up a bit: ~27 minute build time vs. 44 minute build time for https://github.com/nim-lang/Nim/pull/6190 on Travis
01:59:36FromGitter<singularperturbation> Need to figure out the SQLite issue and a lot of other stuff before it can be merged though
02:15:53*rauss joined #nim
02:16:26*mahmudov quit (Ping timeout: 268 seconds)
02:19:19*mahmudov joined #nim
02:25:46*Nobabs27 joined #nim
02:50:36*mahmudov quit (Remote host closed the connection)
03:15:15def-pri-pubsingularpertubation: Are you trying to make the unit testing module run in parallel?
03:41:05*def-pri-pub quit (Quit: leaving)
03:49:25*Nobabs27 quit (Quit: Leaving)
04:00:08*couven92 quit (Quit: Client Disconnecting)
04:01:07*endragor joined #nim
04:05:01*dankrad quit (Ping timeout: 255 seconds)
04:06:42*dankrad joined #nim
04:12:28*pilne quit (Quit: Quitting!)
05:01:58doznError when adding the --memtracker:on option to nim on Windows 10 https://paste.ee/p/cEERR
05:09:03doznSeems like there's a few ways to implement parallelism and concurrency, would there be any recommended method to spawn off a bunch of http requests?
05:11:19doznAraq, thanks for your help with the {.raises.} earlier, I've sucked it up and simply created a main proc which is instantly called, in order to ensure I've caught everything, I believe it's working well =)
05:15:51doznAlthough I do miss being able to stick a "from" or "import" statement right above where it's being used ;)
05:16:45*andrzejku joined #nim
05:26:57*enthus1ast- quit (Ping timeout: 240 seconds)
05:37:27doznAraq, also, regarding where we should see the auto-implied {.raises[].}, it would be great if <insert IDE plugin> (I'm using VSCode) would show which exceptions bubble up whenever you hover over a function. I'm new to exceptions as a method of error handling as well, so perhaps this isn't required for some reason which I'm obviously oblivious to =b
05:38:32doznActually, even if I manually insert a {.raises[].} pragma, that plugin doesn't display it on the tooltip, although it displays everything else ({.gcsafe, locks: <unknown>.}, etc.})
05:52:34*andrzejku quit (Quit: My iMac has gone to sleep. ZZZzzz…)
05:59:07doznIs there syntax which allows me to use a function from another package while in a chain? Thinking something along the lines of debugMessage.(debug.println) or something
05:59:24dozn(the module being called "debug" in this example)
06:10:58*andrzejku joined #nim
06:13:19doznuse a function from another package while specifically stating as such*, debug.println() in the example
06:16:50*v17d quit (Ping timeout: 240 seconds)
06:20:55doznLove how the executable is 276kb (not statically linked, but that's only a few kb more), whereas the same application in Rust is 2559kb, and Go is 5417kb
06:29:00doznI mean shit, nim.exe is 2851kb haha
06:30:01doznWhoops, forgot to add --opt:size, so 180kb =b
06:31:47*v17d joined #nim
06:37:33*haha joined #nim
06:37:58*haha is now known as Guest81170
06:42:01*Guest81170 quit (Read error: Connection reset by peer)
06:43:15*NaClu2 joined #nim
06:45:16*NaClu2 quit (Client Quit)
06:51:52def-dozn: i don't know of any such way to chain, why would you want that?
06:52:11dozndef-, So I can chain whilst there's conflicting functions
06:52:16def-dozn: a module could re-export the identifier, or you could import the original
06:52:31def-ah
06:52:40def-Now I understand, my bad. I thought debugMessage and debug are both modules
06:52:44doznS'all good
06:52:47*Trustable joined #nim
06:52:55doznYeah, I did make the example confusing, due to me having a "debug" module =b
06:53:04def-debug.println(debugMessage, ...) works
06:53:16def-If you care about binary size: https://hookrace.net/blog/nim-binary-size/
06:53:19doznSorry, that was just a random example, not an exact issue I have
06:53:41doznI'm content with the nim binary size, in fact, more than content, I'm ecstatic
06:53:46dozn=)
06:54:06doznI really hope I have some time in a few months to write some tutorials/documentation
06:56:25doznPart of the file size discrepancy is almost certainly due to not dynamically linking SSL, although I'm unsure of what Rust and Go does specifically for it, I believe Go does not by default include SSL
06:56:45doznnot statically linking SSL*
06:56:57def-sounds like a bad idea to statically link ssl
06:57:19def-need to update your application with each openssl vulnerability
06:57:37def-but with dyn libs you run into problems of different versions being available on linux distros
06:57:51doznYar, I've gone back and forth for years, but I've finally settled on static binaries
06:58:09doznI just watch every dependency and rebuild when need be
06:58:40doznI actually built an app which did this for me, I wonder if I still have it hanging around..
06:58:58doznFuck, I think I wrote it in PHP 15 years ago hahaha
07:00:42dozneven libssl.a is only ~600->700kb
07:03:27doznhttp://midipix.org/#sec-midipix looks neat, I wonder if it would allow me dynamically link musl on Windows...
07:03:44doznCtrl+F musl
07:03:47def-why would you want to do that?
07:04:29doznI just think it's twisted haha
07:04:42def-I would understand it if you're writing straight in C
07:04:52def-But Nim has reasonable Windows support
07:05:05doznDo nim binaries include a C std replacement?
07:05:20doznOr does it dynamically link to some Windows C backend
07:05:29dozn(my knowledge regarding Windows is incredibly limited)
07:05:31def-dyn link against system's c stdlib
07:05:54doznAny idea what that would be on Windows, or shall I do some Googling? =D
07:06:16def-some windows specific dll I assume, forgot its exact name
07:06:26doznNo worries, thanks a lot for everything
07:09:53doznmsvcrt.dll
07:22:36*haha_ joined #nim
07:24:20*tdc joined #nim
07:24:57*andrzejku quit (Quit: My iMac has gone to sleep. ZZZzzz…)
07:26:14*andrzejku joined #nim
07:26:43*ftsf quit (Ping timeout: 246 seconds)
07:28:08doznEh, can't get it working, oh well, on to things that actually matter =b
07:30:05*Trustable quit (Remote host closed the connection)
07:30:48*ftsf joined #nim
07:43:51*tdc quit (Remote host closed the connection)
07:48:03*rauss quit (Quit: WeeChat 1.9)
08:08:23*Ven joined #nim
08:08:46*Ven is now known as Guest71332
08:20:23*ftsf quit (Ping timeout: 246 seconds)
08:21:43FromGitter<timmyjose> Hey folks, long shot here, but is there any plugin for Nim in Far Manager?
08:28:33*tdc joined #nim
08:30:45doznhttp://www.farmanager.com/ ?
08:31:34*yglukhov joined #nim
08:34:15*ftsf joined #nim
08:36:07*ShalokShalom joined #nim
08:37:44FromGitter<timmyjose> @dozn So you mean I must implement it myself if I want a Nim plugin?
08:38:02Araqdozn: I guess it's just something we need to implement (nimsuggest showing .raises information)
08:38:17*dozn nods
08:38:28Araqtimmyjose: it's not clear what a plugin would achieve for it
08:38:42FromGitter<timmyjose> I mean basic syntax highlighting and such
08:41:49FromGitter<timmyjose> I am used to working with Far Manager on Windows. so it would be lovely to have support for Nim in Far Manager,. Maybe I can consider working on a plugin myself in the near future - that would be an interesting project :-)
08:45:10doznSeems like there's a few ways to implement parallelism and concurrency, would there be any recommended method to spawn off a bunch of http requests?
08:45:51*andrzejku quit (Quit: Textual IRC Client: www.textualapp.com)
08:45:54Araqdozn: currently, use the asynchttpserver and no threading
08:46:52*Guest71332 is now known as Ven``
08:47:00doznOkay, let's imagine I'm also at the same time concurrently doing data on the HTML retrieved, what should I be using for concurrency in that instance? (if asynchttpserver still handles that, just say "2" =b)
08:47:28doznrunning functions on the HTML*
08:48:17doznOh sorry, I'm not running a server, I'm running a client
08:48:22doznWeb scraping
08:50:02doznRight now I'm just using `httpclient.newHttpClient().getContent(url).newStringStream.parseHtml`, I want to throw that (using a concurrency primitive) into a longer proc which also does other things (perhaps spawn off more concurrent things)
08:50:53doznI'm assuming I want asyncdispatch, but I've never used a language with async before, so asking to be sure there's no better methods.
08:52:05*Matthias247 joined #nim
08:55:21Araqin the asynchttpclient's handler, use 'spawn'
08:55:24*ShalokShalom quit (Ping timeout: 260 seconds)
08:58:42doznOh fuck me, of course there's a corresponding asynchttpclient to the -server version, thanks a lot Araq
08:59:33doznAre you planning on merging both httpclient and asynchttpclient at some point?
09:00:17*ShalokShalom joined #nim
09:01:45AraqI think they are both in the same module, so no, why?
09:04:05doznDerp.
09:16:39*piotr_ joined #nim
09:19:10*couven92 joined #nim
09:20:03couven92Hello World! Rise and shine everybody! :)
09:21:26doznIs it morning already? Shit, I forgot to sleep >_<
09:24:00couven92dozn, yeah, it almost midday here :) 11:23
09:24:11dozn2:24 here =b
09:24:17doznI won't be going to bed for a few hours yet, however
09:24:56couven92i nearly forgot to sleep yesterday as well... After we finished merging Android support into Nim, I decided to treat myself with a game of Civ V... "One More Turn" indeed! :D
09:25:22doznI saw that, congrats! Very exciting =) FTL is my drug of choice for single player games to get lost in
09:25:45doznhttp://steamcommunity.com/id/dozn
09:26:01doznI don't really game much these days
09:26:17dozn980 of those hours in CS:GO are from more than a few years ago
09:26:55couven92me neither... but now I am about to finish my M.Sc. and suddenly I only have a job instead of being a full-time student! :P
09:27:13doznOh wow, the free time must be hard to deal with =b
09:28:27couven92yeah... though my classmates and I recently seriously started playing Factorio... Very OCD-friendly and highly addictive! :D
09:28:46couven92bad time management decisions!!! :P
09:29:17doznOh god, I've been purposely avoiding it
09:29:25doznTIS-100 was amazing
09:29:52couven92can't say I've heard of that one?
09:29:56*ftsf quit (Ping timeout: 260 seconds)
09:29:58doznhttp://store.steampowered.com/app/370360/TIS100/
09:30:01doznIt's incredibly fun
09:30:26couven92huh... cool! :)
09:30:52*arnetheduck joined #nim
09:32:10dozncouven92, Do you have http://store.steampowered.com/sub/17602/ or http://store.steampowered.com/app/322330/Dont_Starve_Together/ ?
09:32:57couven92I have Don't Starve Together... but only played about 3 hours... Just bought that recently
09:33:14couven92http://steamcommunity.com/id/couven92/
09:33:55dozncouven92, PM me your email and I'll send you the hacker game
09:34:12doznThey had glitched pricing for a while, so I bought a bunch
09:37:09doznIf you have a friend who wants Don't Starve, let me know
09:38:39couven92cool :)
09:46:32*ShalokShalom quit (Quit: No Ping reply in 180 seconds.)
09:48:00*ShalokShalom joined #nim
09:48:40*ftsf joined #nim
09:52:44*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:58:51*Ven joined #nim
09:59:16*Ven is now known as Guest27753
10:08:44*haha_ quit (Read error: Connection reset by peer)
10:10:22FromGitter<TiberiumN> hacker game? what is it?
10:11:12FromGitter<TiberiumN> http://steamcommunity.com/id/tiberiumk I don't play much games too ⏎ maybe some Battlefield 1
10:12:24FromGitter<TiberiumN> but it's not in steam :)
10:13:43FromGitter<TiberiumN> also, maybe we can add Android (via termux) in "Compiling" section in readme?
10:14:01FromGitter<TiberiumN> well after csources will be generated again (for 0.17.2 or 0.18)
10:17:24couven92@TiberiumN, good idea, a post in the forum would also be nice... I'll do that soon, just have to finish breakfast :)
10:18:59*Guest27753 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:28:46*yglukhov quit (Remote host closed the connection)
10:31:43*mahmudov joined #nim
10:38:09FromGitter<TiberiumN> wow, I didn't knew that strutils.editDistance works for unicode strings too
10:38:10FromGitter<TiberiumN> cool!
10:41:05*ShalokShalom quit (Ping timeout: 240 seconds)
10:42:07*Ven_ joined #nim
10:42:49def-@TiberiumN: Well, it does something, but I would not assume correct results
10:43:10FromGitter<TiberiumN> why? it makes correct results
10:43:19def-I just looked at the implementation
10:43:27def-It just takes each byte as a character, doesn't seem to handle unicode
10:43:58def-generally all unicode handling stuff is in unicode module
10:44:04FromGitter<TiberiumN> well, how does it work then?
10:44:08FromGitter<TiberiumN> it works for me
10:44:25def-you might not have tried it with a large enough subset of unicode
10:44:39FromGitter<TiberiumN> well I only need russian and english :)
10:44:45FromGitter<TiberiumN> and it works for russian text
10:47:43def-it should not be too hard to make a proper unicode version though, split into runes and use those runes for comparisons
10:47:59*BitPuffin|osx joined #nim
10:50:18def-except if you want to care about combining marks too
10:51:02doznMmm, graphemes
10:51:14doznErr, grapheme clusters
10:51:15FromGitter<TiberiumN> but how does it work for unicode?! i don't understand
10:51:25FromGitter<TiberiumN> *for a subset of unicode
10:52:17*mahmudov quit (Quit: Leaving)
10:52:19def-assuming utf8 encoded strings, if 2 characters have the same prefix bytes and only differ in the last bytes, it should work. as long as you use characters that happen to have the same byte length
10:52:35*mahmudov joined #nim
10:52:39def-but if you mix ascii with cyrillic, it should give wrong results
10:52:53FromGitter<TiberiumN> hmm, ok
10:54:41def-editDistance("aa", "Дa")
10:54:55def-changed 1 character, still returns 2
10:55:09FromGitter<TiberiumN> well ok
10:55:35*piotr_ quit (Quit: Leaving)
10:56:43def-because Д is [0xd0, 0x94] in utf8, so it's interpreted as 2 characters, while a is 0x61
10:59:55*haha_ joined #nim
11:04:48FromGitter<TiberiumN> well I think it would better if I'll just use simple implementation of levenshtein distance, because this implementation seems to be optimized a lot for ascii
11:08:18*dddddd joined #nim
11:08:35Araqoh yeah, please move editDistance to the unicode module and fix it
11:12:28couven92Araq, the CI run for the Testament upgrade lit up all green during the night: https://github.com/nim-lang/Nim/pull/6058
11:12:49FromGitter<TiberiumN> wow, appveyor started to work?
11:13:12FromGitter<TiberiumN> it seems so - https://github.com/nim-lang/Nim/pull/6190 even here appveyor is passed
11:13:13FromGitter<TiberiumN> hmm
11:13:29FromGitter<TiberiumN> oh wait
11:13:29FromGitter<TiberiumN> in 3 hours in 54 min 58 sec
11:13:30FromGitter<TiberiumN> wat
11:16:36*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:17:13AraqTiberiumN: I fixed the windows builds 2 days ago
11:17:33FromGitter<TiberiumN> ah, ok
11:17:40FromGitter<TiberiumN> what was the cause?
11:19:43Araqyou don't want to know
11:19:49FromGitter<TiberiumN> ok :)
11:19:57Araqbut it made perfect sense
11:20:10Araqand was mostly a conincidence that only windows was affected
11:21:31*mahmudov quit (Quit: Leaving)
11:21:51*mahmudov joined #nim
11:24:57*ShalokShalom joined #nim
11:25:07*BitPuffin|osx quit (Ping timeout: 276 seconds)
11:30:59*enthus1ast- joined #nim
11:41:22*tdc quit (Ping timeout: 276 seconds)
11:43:34Araqcouven92: feel like improving the stdlib at the same time?
11:43:57couven92sure, what do you need?
11:45:49Araqstrutils.multiReplace
11:47:54couven92Araq, okay... take a table as argument and replace? Or what should it do?
11:48:34Araqvarargs[(string, string)]
11:49:00couven92yeah okay, that makes more sense
11:49:21Araqoh and don't hack the implementation together with the existing replace
11:49:30Araqa single pass over the input string please
11:49:45couven92yeah... avoid allocations, got it! :)
11:49:58Araqthis is required for correctness anyway, think about x.multiReplace(("a", "b"), ("b", "a"))
11:50:36Araqthat needs to swap a's and b's
11:51:32couven92yeah... thinking: iterate over the input at each character see if it starts with one of the replacement tuples and then replace
11:59:02*Ven joined #nim
11:59:27*Ven is now known as Guest22119
12:02:19*yglukhov joined #nim
12:12:15*http_GK1wmSU joined #nim
12:13:15*http_GK1wmSU left #nim (#nim)
12:22:02*yglukhov quit (Remote host closed the connection)
12:28:48*endragor quit (Remote host closed the connection)
12:30:44*endragor joined #nim
12:35:11*endragor quit (Ping timeout: 246 seconds)
12:36:11*Sentreen quit (Ping timeout: 268 seconds)
12:36:22*Matthias247 quit (Read error: Connection reset by peer)
12:40:35*Guest22119 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:49:10*Sentreen joined #nim
12:58:09*Sentreen quit (Ping timeout: 240 seconds)
13:03:53*yglukhov joined #nim
13:11:42*Sentreen joined #nim
13:16:21*yglukhov quit (Remote host closed the connection)
13:18:46*haha_ quit (Quit: haha_)
13:26:43*pilne joined #nim
13:27:56*ShalokShalom quit (Ping timeout: 260 seconds)
13:27:58*ShalokShalom_ joined #nim
13:34:42*mahtov quit (Ping timeout: 260 seconds)
13:39:44*mahtov joined #nim
13:40:04*ShalokShalom_ quit (Ping timeout: 260 seconds)
13:54:59*Vladar joined #nim
14:08:45couven92Araq, https://github.com/nim-lang/Nim/pull/6193
14:10:03couven92Araq, But I also need some help... I tried first to preallocate result with the length of s with `result = newString(s.len)` but then add didn't seem to add the replacement strings?
14:10:31FromGitter<TiberiumN> AFAIK if you preallocate a string or sequence you need to modify it by index
14:10:37FromGitter<TiberiumN> not by doing "add"
14:10:44def-couven92: probably a \0 byte inbetween in your string
14:11:02couven92hmm... okay
14:11:26def-@TiberiumN No, you can preallocate, and then use add.
14:11:37FromGitter<TiberiumN> I know
14:11:53FromGitter<TiberiumN> but first chars then would be empty
14:12:00def-Strings are just a bit dangerous because they have both a length and also end on \0 byte
14:12:10def-but that's only for strings, not sequences
14:14:45couven92def-, so how do I do it? https://github.com/couven92/Nim/blob/strutils-multireplace/lib/pure/strutils.nim#L1557
14:15:55def-couven92: what's your goal?
14:16:49couven92I have result and it should possibly be preallocated with s.len, then i add replacement parts to it as I iterate through s
14:17:17def-but what do you want to be the content of result?
14:17:33def-what are "replacement parts"?
14:17:47def-Ah, I think I understand
14:17:52subsetparkAraq : can't that just overload on the signature of strutils.replace?
14:18:00def-use newStringOfCap()
14:18:44couven92def-, okay... but what if my new string actually gets longer than the original length of s? Should I realloc then?
14:18:53def-no, that happens automatically
14:19:01couven92Ah! great! :)
14:19:05def-if you just add until the initially allocated size, no reallocs happen
14:19:13def-if you add more, it will grow automatically
14:19:41couven92very good! exactly what I want... I misunderstood Cap in newStringOfCap :P
14:20:02def-Yeah, it's just its current capacity, not the maximum capacity it can have
14:21:13couven92def-, great! thanks! works like a charm! :)
14:24:23couven92okay, Araq https://github.com/nim-lang/Nim/pull/6193 is ready for review :)
14:26:07*haha_ joined #nim
14:40:55Araqsubsetpark: we could but wouldn't it be a bit weird? multiReplace is a different operation
14:54:34*endragor joined #nim
14:59:05*endragor quit (Ping timeout: 240 seconds)
15:09:53*Sentreen quit (Ping timeout: 248 seconds)
15:11:17*rauss joined #nim
15:14:29*javax joined #nim
15:24:01*Sentreen joined #nim
15:34:13*cspar joined #nim
15:35:03FromGitter<TiberiumN> how can I get input from the console on windows, and input is unicode?
15:38:40*mahmudov quit (Quit: Leaving)
15:39:01*mahmudov joined #nim
15:39:41FromGitter<TiberiumN> if I try to input 3 unicode characters in windows console (and I've ran chcp 65001 and console font is lucida console), repr of this input is just 00A7E030"\0\0\0"
15:47:43*dddddd quit (Ping timeout: 276 seconds)
15:47:59AraqTiberiumN: Good question
15:49:16FromGitter<TiberiumN> well it kinda works better now
15:49:32FromGitter<TiberiumN> I've used proc setConsoleOutputCP(codepage: cint): cint ⏎ ⏎ ```{.stdcall, dynlib: "kernel32", importc: "SetConsoleOutputCP".}``` [https://gitter.im/nim-lang/Nim?at=59873a8cc101bc4e3af2f229]
15:49:33FromGitter<ephja> hm, "libbearlibterminal.dll" :p
15:51:04FromGitter<TiberiumN> but nim does not do this by default
15:59:44*dddddd joined #nim
16:05:23FromGitter<TiberiumN> omg I can't figure out why I can't send string, which is being read from the console on windows
16:05:26FromGitter<TiberiumN> e.g. I can echo it
16:05:43FromGitter<TiberiumN> but when I try to send it - it results in incorrect characters sent to api
16:07:09FromGitter<TiberiumN> i have no clue...
16:08:43*Ven joined #nim
16:09:06*Ven is now known as Guest4921
16:11:45FromGitter<TiberiumN> fucking windows
16:16:10FromGitter<ephja> doesn't powershell default to utf-8?
16:16:40FromGitter<TiberiumN> no
16:17:16FromGitter<ephja> silly
16:17:43FromGitter<TiberiumN> maybe it does have some unicode
16:17:58FromGitter<TiberiumN> but not enough
16:18:21FromGitter<ephja> 0-127? :p
16:36:30*Matthias247 joined #nim
16:41:36FromGitter<ephja> "libzip_all.o:libzip_all.c:(.text+0x6de8): undefined reference to `crc32'"
16:41:53FromGitter<ephja> maybe it works on unix where it does this: {.passl: "-lz".}
16:42:04*Guest4921 quit (Read error: Connection reset by peer)
16:44:11FromGitter<TiberiumN> yes
16:51:34*Trustable joined #nim
16:54:40*Ven_ joined #nim
17:00:54*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:04:38*smt_ quit (Read error: Connection reset by peer)
17:14:22*crem quit (Quit: leaving)
17:14:37*crem joined #nim
17:15:31Araqhttps://www.youtube.com/watch?v=o9pEzgHorH0
17:17:20couven92Araq, The multi-replace strutils is now all green: https://github.com/nim-lang/Nim/pull/6193
17:18:19*haha_ quit (Quit: haha_)
17:25:00*haha_ joined #nim
17:25:46FromGitter<TiberiumN> Araq: wow, I saw that! someone from pypy irc linked this video too, cool talk
17:30:25FromGitter<TiberiumN> after I started using Nim I found that I don't need classes at all 0_0
17:30:31FromGitter<TiberiumN> because I didn't use inheritance
17:30:46FromGitter<TiberiumN> well I did (because I needed with third-party libraries)
17:31:09FromGitter<TiberiumN> *integration with
18:10:18subsetparkAraq: I dunno... I feel like s.replace(sub, by) is just a n=1 case of s.replace((sub, by), (sub, by)...)
18:11:22*Vladar quit (Quit: Leaving)
18:21:04*haha_ quit (Quit: haha_)
18:21:17FromGitter<ephja> []= for cstrings -> segfault???
18:22:28*BitPuffin|osx joined #nim
18:22:36*haha_ joined #nim
18:27:25def-@ephja if you go over its size or it's been deallocated already, yes
18:33:37*mahmudov quit (Quit: Leaving)
18:33:57*mahmudov joined #nim
18:36:29*Trustable quit (Remote host closed the connection)
18:38:31*Trustable joined #nim
18:39:19FromGitter<cyberlis> does nim have function to convert sha1 hash to biginteger?
18:39:38*Ven joined #nim
18:40:01*Ven is now known as Guest2480
18:46:00FromGitter<TiberiumN> ehm?
18:46:11FromGitter<TiberiumN> why do you want big int for sha1?
18:46:25FromGitter<cyberlis> any int
18:46:33FromGitter<cyberlis> i want compare to sha1 hashes
18:46:39FromGitter<TiberiumN> well just compare them as strings?
18:46:40FromGitter<cyberlis> what is begger
18:47:00FromGitter<TiberiumN> what do you mean "bigger"?
18:47:04FromGitter<TiberiumN> you can't get file size from sha1
18:47:19FromGitter<cyberlis> hashes a big numbers
18:47:45FromGitter<cyberlis> that is why you can compare them
18:48:20FromGitter<TiberiumN> well you can compare them as strings too
18:49:04FromGitter<cyberlis> you think it will give the same result? i will check it in python
18:49:16FromGitter<TiberiumN> why not?
18:49:22*Trustable quit (Remote host closed the connection)
18:49:27FromGitter<TiberiumN> if hashes are different as strings they'll different as numbers
18:49:37FromGitter<TiberiumN> well there's pure-nim bignums, but it's not very fast AFAIK
18:49:41couven92@cyberlis, Uhm no! Hashes are binary blobs with no meaning at all, except that you can sequence compare to hashes. If they're not sequence equal the hash origin are different from each other
18:50:20FromGitter<TiberiumN> I don't really understand why do you need big numbers, but there is - https://github.com/def-/nim-bigints
18:50:41FromGitter<TiberiumN> but I think you don't need them
18:50:42FromGitter<TiberiumN> at all
18:51:28FromGitter<cyberlis> Wikipedia
18:51:29FromGitter<cyberlis> A SHA-1 hash value is typically rendered as a hexadecimal number, 40 digits long.
18:51:33FromGitter<cyberlis> number
18:51:38FromGitter<TiberiumN> well "typically"
18:51:43FromGitter<TiberiumN> it's just a matter of the preference
18:51:49FromGitter<cyberlis> hexadecimal number
18:51:59FromGitter<TiberiumN> you can have it as bytes
18:52:09FromGitter<cyberlis> one number can be bigger than other
18:52:12FromGitter<TiberiumN> can you explain what are you trying to achieve?
18:52:14FromGitter<cyberlis> is it true?
18:52:22couven92@cyberlis No! Wrong, 40 hex digits to represent a 20-byte arre
18:52:43couven92*array
18:53:04FromGitter<cyberlis> ok i see
18:53:06FromGitter<cyberlis> thanks
18:57:22couven92@cyberlis, also, if you'd actually convert a SHA-hash to a value it would be enourmously large! Remember 64-bit values go up to ~18 trillion, A 20-byte numerical value would stretch over 160 bits! And with each bit you double the possible values... It's enomous!
19:03:29*Araq_ joined #nim
19:04:24*StarBrilliant1 joined #nim
19:04:40*Lord_Nightmare2 joined #nim
19:07:54*jivank[m] quit (*.net *.split)
19:07:54*TheManiac quit (*.net *.split)
19:07:55*Lord_Nightmare quit (*.net *.split)
19:07:55*Araq quit (*.net *.split)
19:07:56*surma quit (*.net *.split)
19:07:57*joshbaptiste quit (*.net *.split)
19:07:57*StarBrilliant quit (*.net *.split)
19:07:58*StarBrilliant1 is now known as StarBrilliant
19:07:58*Lord_Nightmare2 is now known as Lord_Nightmare
19:10:58FromGitter<TiberiumN> @vegansk or @yglukhov, are you here by any chance? just wanted to ask if it's possible to use nim on android via https://github.com/vegansk/jnim ?
19:12:38*yglukhov joined #nim
19:13:19FromGitter<TiberiumN> ah it seems it's possible
19:13:21FromGitter<TiberiumN> but no example apps :)
19:15:48*MrAxilus[m] quit (Ping timeout: 240 seconds)
19:15:50*mindB quit (Ping timeout: 240 seconds)
19:16:11*Demos[m] quit (Ping timeout: 258 seconds)
19:16:31*ehmry quit (Ping timeout: 240 seconds)
19:16:39*hohlerde quit (Ping timeout: 255 seconds)
19:16:47*dyce[m] quit (Ping timeout: 240 seconds)
19:18:49*surma joined #nim
19:18:50*joshbaptiste joined #nim
19:23:11*Guest2480 is now known as Ven``
19:30:01*endragor joined #nim
19:31:37*vivus joined #nim
19:34:43*endragor quit (Ping timeout: 255 seconds)
19:38:40*yglukhov quit (Remote host closed the connection)
19:41:21*v17d quit (Ping timeout: 248 seconds)
19:42:18*haha_ quit (Quit: haha_)
19:43:54*haha_ joined #nim
19:48:08*smt joined #nim
19:53:35*salewski joined #nim
19:54:15salewski# how can we construct the name of a const identifier in a macro?
19:54:21salewskiconst CX = 7
19:54:27salewskimacro t(s: string): typed =
19:54:33salewski echo CX
19:54:41salewski #echo `C s` # should echo also value 7 when we compile
19:54:50salewskit("X")
19:54:55*v17d joined #nim
19:54:57salewski?
19:57:52salewskiWhat I really want to use in the macro is something like "var s = CX"
19:58:14salewskiwhere CX is a string constant.
19:59:45salewskiI thought that would be easy. But maybe it is easier putting that string constant in a hash table
20:00:07salewskiand accessing that hash table from within the macro.
20:01:18FromGitter<singularperturbation> so you're passing in the name of the constant to the macro and then setting the var equal to that variable?
20:01:46FromGitter<singularperturbation> can you pass in the const as a value to the macro instead? and then do quasi-quoting on the expression that's passed in to the macro ?
20:02:29FromGitter<singularperturbation> only other thing I can think of is building a `newIdentNode` from the string passed in and playing around with that?
20:03:34salewskiThe user calls the macro like "connect("draw", myfunc, myarc)"
20:04:27salewskiAnd in the macro I have to construct an const identifier like "draw_widget"
20:04:38*Matthias247 quit (Read error: Connection reset by peer)
20:04:54salewski"draw_widget" is a string constant which i need...
20:06:03salewskiWell, maybe indeed not as easy as I thought. Will try a hash table...
20:06:16FromGitter<TiberiumN> why it isn't easy?
20:06:23FromGitter<TiberiumN> do something with this string and generate new const statement?
20:07:42salewskiYes, I tried that for some time now, no success. Can you provide an example?
20:10:47*mahmudov quit (Quit: Leaving)
20:10:50FromGitter<TiberiumN> something like this? https://play.nim-lang.org/?gist=c4c66ba0d261950f7f56a0990b429175
20:11:06FromGitter<TiberiumN> well you can generate AST manually instead of using quote do
20:11:08*mahmudov joined #nim
20:11:34FromGitter<TiberiumN> proc `!`(s: string): NimIdent {..} ⏎ constructs an identifier from the string s
20:13:13salewskiMaybe an optionn is indeed that users call the macro without quotes like connect(draw, myfunc, myarc)
20:13:42salewskiThanks TiberiumN, looks great, I will test it.
20:13:57FromGitter<TiberiumN> without quotes - I think this is possible
20:14:01*haha_ quit (Quit: haha_)
20:15:08*hohlerde joined #nim
20:17:59FromGitter<TiberiumN> well maybe this is a hacky solution
20:18:14FromGitter<TiberiumN> https://play.nim-lang.org/?gist=d9639f3fdc80e29776b0586700332323
20:20:26FromGitter<TiberiumN> salewski: ^
20:28:44salewskiIt is not really what I need :-) I want output 7 when I compile, but get CX:
20:28:49salewskiimport macros
20:28:55salewskiconst CX = 7
20:29:00salewskimacro t(s: string): untyped =
20:29:06salewski let data = "C" & s.strVal
20:29:13salewski let ident = !data
20:29:17salewski echo ident
20:29:49salewskit("X")
20:31:26salewskiWhat I really want is to access an existing const identifier by constructing its name!
20:31:47*Lord_Nightmare quit (Ping timeout: 260 seconds)
20:32:31salewskiI guess it is possible, but can not see it currently. Will try tomorrow, bye.
20:35:37*Ven`` quit (Read error: Connection reset by peer)
20:43:48*Lord_Nightmare joined #nim
20:50:27*Nobabs27 joined #nim
20:52:30salewskiWell, table in combination with static works indeed :-)
20:52:30salewskimport macros, tables
20:52:32salewskistatic:
20:52:39salewski var tr: TableRef[string, int]
20:52:45salewski tr = newTable[string, int]()
20:52:51salewski const CX = 7
20:52:58salewski tr.add("CX", CX)
20:53:04salewski#echo tr["CX"]
20:53:12salewskimacro t(s: string): untyped =
20:53:20salewski var whatINeed = tr["C" & $s]
20:53:27salewski echo whatINeed
20:54:17*v17d quit (Ping timeout: 246 seconds)
20:56:33salewskit("X")
20:57:39salewskiSo output is 7 when compiling as desired!
20:58:33*def-pri-pub joined #nim
21:02:25FromGitter<TiberiumN> well i think it can be done without any tables
21:03:00def-pri-pubzacharycarter: I'm trying out zengine. For example 00, I assume I'm supposed to be able to move around? It's not really working for me.
21:03:46def-pri-pubAlso, it's keeping my mouse within the screen, so I can get it out of the window borders. That means that I also can't exit. I have to Alt+F4 to quit.
21:03:52def-pri-pub(I'm on Linux BTW).
21:12:44FromGitter<zacharycarter> hrm
21:13:13FromGitter<zacharycarter> let me point you to some code
21:14:24FromGitter<zacharycarter> nevermind - let me just explain, left shift and left alt can be used to rotate the camera when held down together
21:14:24FromGitter<zacharycarter> mouse wheel zooms in and out
21:14:39FromGitter<zacharycarter> left shift by itself pans
21:14:58FromGitter<zacharycarter> the keeping your mouse within the screen can be easilyturned off
21:15:20*jivank[m] joined #nim
21:16:10*TheManiac joined #nim
21:16:19def-pri-pubMy personal opntion, is that by default the mouse shouldn't be contained to the screen.
21:16:27FromGitter<zacharycarter> I agree
21:17:01FromGitter<zacharycarter> for now though please uncomment this line
21:17:04FromGitter<zacharycarter> errr
21:17:05FromGitter<zacharycarter> sorry
21:17:19FromGitter<zacharycarter> change this line from ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5987875f1c8697534a938892]
21:17:30*mindB joined #nim
21:17:32FromGitter<zacharycarter> ```code paste, see link```
21:17:35FromGitter<zacharycarter> line 40 in core.nim
21:18:51*Demos[m] joined #nim
21:18:51*MrAxilus[m] joined #nim
21:19:15*ehmry joined #nim
21:21:11*dyce[m] joined #nim
21:41:08FromGitter<TiberiumN> termux is a great app, especially with oh-my-zsh :)
21:41:11FromGitter<TiberiumN> http://i.imgur.com/exz4Meg.png
22:07:09*Nobabs27 quit (Quit: Leaving)
22:17:57*enthus1ast- quit (Ping timeout: 260 seconds)
22:24:45*enthus1ast- joined #nim
22:43:02*Sentreen quit (Quit: WeeChat 1.6)
22:43:30*Sentreen joined #nim
22:53:49*dddddd quit (Quit: Hasta otra..)
22:56:11*onionhammer1 quit (Read error: No route to host)
23:02:29*cspar quit (Read error: Connection reset by peer)
23:02:56*cspar joined #nim
23:03:21*Ven joined #nim
23:03:45*Ven is now known as Guest47023
23:05:35*m712 quit (Ping timeout: 240 seconds)
23:08:28*Guest47023 quit (Ping timeout: 260 seconds)
23:09:14*m712 joined #nim
23:32:56*salewski quit (Quit: WeeChat 1.4)
23:42:44*jinshil joined #nim
23:56:44*Jesin quit (Quit: Leaving)