<< 04-04-2019 >>

00:02:25*rnrwashere quit (Ping timeout: 246 seconds)
00:03:41*rockcavera quit (Remote host closed the connection)
00:08:06*rockcavera joined #nim
00:19:15*thomasross_ joined #nim
00:19:15*thomasross quit (Killed (barjavel.freenode.net (Nickname regained by services)))
00:19:15*thomasross_ is now known as thomasross
00:28:05*rnrwashere joined #nim
00:32:23*rnrwashere quit (Ping timeout: 246 seconds)
00:33:58*rnrwashere joined #nim
00:37:12*rnrwashere quit (Remote host closed the connection)
00:40:06FromDiscord<demotomohiro> iirc, GC cannot handle memory in GPU. Becaue we cannot have custom destructor to free GPU memory.
00:41:11FromDiscord<demotomohiro> Owned refs allow custom destructor and it is called as soon as it is no logner referenced.
00:43:05*rnrwashere joined #nim
00:43:05FromDiscord<demotomohiro> Even if GC allow making custom destoractor, calling destoractor can be delayed and it might called after OpenGL context was destoryed
00:45:04FromDiscord<demotomohiro> It seems GC can handle only main memory. They cannot be used to free other resource like opengl objects, window handle, socket, file handle and etc.
00:50:34*rnrwashere quit (Remote host closed the connection)
00:53:11*rnrwashere joined #nim
01:45:36*sealmove joined #nim
01:45:52sealmoveHey, I logged in just to say how hilarious I found V-Nim comparison xD +1
01:46:35sealmoveplanetis: do you know about python's while ... else? comment?
02:03:30*jasom quit (Ping timeout: 264 seconds)
02:06:45*banc quit (Quit: Bye)
02:15:45*rnrwashere quit (Remote host closed the connection)
02:16:04*rnrwashere joined #nim
02:23:52*tiorock joined #nim
02:23:52*rockcavera is now known as Guest44991
02:23:52*tiorock is now known as rockcavera
02:27:07*Guest44991 quit (Ping timeout: 245 seconds)
02:27:59*banc joined #nim
02:31:28FromGitter<jivank> i am crosscompiling my application for a openwrt mips cpu. in gdb i am getting `Program received signal SIGILL, Illegal instruction. ⏎ 0x0040f3c4 in newSeq ()`
02:31:53*couven92 quit (Read error: Connection reset by peer)
02:37:32*Cthalupa quit (Ping timeout: 250 seconds)
02:38:02*Cthalupa joined #nim
02:42:16leorizehow are you cross compiling it?
02:47:00FromGitter<jivank> i downloaded the sdk and added its bin to my path. i use the --cpu and --os flags
02:49:53FromGitter<jivank> i also get a lot of warnings: `uses -msoft-float (set by /tmp/OpenWrt-SDK-15.05-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mips-openwrt-linux ⏎ -uclibc/4.8.3/crtbegin.o), /home/jivank/.cache/nim/sambalshare_r/utils.c.o uses -mhard-float`
02:52:48FromGitter<jivank> ok i cleared the cache and i dont get that anymore. hopefully this works :)
03:03:20*dddddd quit (Remote host closed the connection)
03:04:49FromGitter<jivank> nice, after installing librt and libpthread it seems to work
03:37:35*noeontheend joined #nim
03:44:42*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:09:40*rnrwashere quit (Remote host closed the connection)
04:36:53*nsf joined #nim
04:48:32*noeontheend quit (Ping timeout: 250 seconds)
05:01:52*narimiran joined #nim
05:08:50*cornfeedhobo quit (Quit: ZNC - https://znc.in)
05:23:44*I_Right_I quit (Remote host closed the connection)
05:28:30*disruptek quit (Ping timeout: 246 seconds)
05:30:51*cornfeedhobo joined #nim
05:34:11*Cthalupa quit (Ping timeout: 244 seconds)
05:35:18*Cthalupa joined #nim
05:38:10*solitudesf joined #nim
05:42:25*disruptek joined #nim
06:18:20*rnrwashere joined #nim
06:22:34*rnrwashere quit (Ping timeout: 250 seconds)
06:23:16*sealmove quit (Quit: WeeChat 2.4)
06:27:58*solitudesf quit (Ping timeout: 245 seconds)
06:37:54*krux02 joined #nim
06:38:40*MightyJoe quit (Quit: No Ping reply in 180 seconds.)
06:39:55*cyraxjoe joined #nim
06:43:11*PMunch joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:36*gmpreussner joined #nim
07:42:01*Vladar joined #nim
08:08:15*Cthalupa quit (Ping timeout: 255 seconds)
08:10:09*Cthalupa joined #nim
08:33:32*stefanos82 joined #nim
08:36:10PMunchHmm, I want to create a template to avoid having to retype some error handling stuff. It works great, but I'm stuck between making it too general to really save on typing, or too specific so I need to copy the template around.
08:36:46PMunchCan I have global static variables that I can set to things in order for this to work?
08:40:11leorizea bit of copying wouldn't hurt :p
08:41:12PMunchOf course it does
08:41:25PMunchIt introduces all kinds of workflow error sources
08:43:53PMunchOooh, a GCC crash: http://ix.io/1Fhg/
08:44:02PMunchThose are getting few and far between nowadays
08:46:04PMunchMinimal example: http://ix.io/1Fhi/
08:46:37PMunchhttp://ix.io/1Fhi <- link that isn't a single line
08:47:05leorizewhat kind of error handling are you working on?
08:47:52leorizealso to answer your question, it's possible, but rather buggy the last time I tried and might not work well when incremental compiling is introduced
08:48:45leorizeinstead of a global variable you can just pass the state around, no? if it's too much typing then just create yet another template for your template :p
08:50:29PMunchhttp://ix.io/1Fhl/Nim
08:51:35Araqbug report
08:52:23PMunchThat's what I'm working on leorize, so basically I want to move the checkSegment template out of that procedure and generalize header and message
08:53:10PMunchBut without changing all those calls to header.checkSegment(0, 2, "SYNTAX IDENTIFIER", syntax, "UNB interchange header field")
08:53:27PMunchAraq, I'm not sure what the expected behaviour there would be though
08:53:34PMunchApart from not crashing GCC of course
08:55:03leorizePMunch: As a starter, may be turn it into a "dirty" template?
08:55:17PMunchHmm, yeah that's an option
08:55:31PMunchOr I could create a second template as you said
08:58:54leorizethat also works :)
09:01:43PMunchhttp://ix.io/1Fhn/Nim
09:02:03leorizePMunch: regarding the bug you found, it can be reproduced without a template on nim devel
09:02:12PMunchCan it
09:02:19PMunch?
09:03:46leorizehttp://ix.io/1Fhq/nim
09:03:48leorizesame error
09:04:21*abm joined #nim
09:05:02leorizealso that error handling scheme is really nice :)
09:07:56PMunchThanks :)
09:10:59*ng0 joined #nim
09:15:23PMunchGotta show of the power of Nim if any of my collegues ever want to have a look at this code ;)
09:23:57PMunchHad to add support for optional fields as well: http://ix.io/1Fht/Nim
09:31:13*dddddd joined #nim
09:32:00livcdPMunch: why did you have to create another odbc wrapper ? sorry i did not fllow the discussion
09:51:04*a_b_m joined #nim
09:54:31*abm quit (Ping timeout: 258 seconds)
09:55:45*dom96_w joined #nim
10:12:40*sz0 joined #nim
10:20:37*mosORadi joined #nim
10:26:35*neceve joined #nim
10:35:46PMunchlivcd, I ended up not doing it. I just didn't know one existed already :P
10:35:55PMunchNow I'm using coffeepots library
10:42:19*lritter joined #nim
10:50:38*clyybber joined #nim
11:18:32*floppydh joined #nim
11:21:43*tdc quit (Ping timeout: 245 seconds)
11:21:59PMunchleorize, http://ix.io/1FhX/Nim getting better and better. The actual parsing components are now almost 100% logic while all the common checking functionality is put away in templates
11:25:46FromGitter<kayabaNerve> So. I was working on some code, and had a 64 byte number represented as a 171 char string.
11:26:18FromGitter<kayabaNerve> It took me a while to find the bug, but I did. `str &= rand(255)`
11:26:18FromGitter<kayabaNerve> This bug is my fault; don't get me wrong.
11:26:44FromGitter<kayabaNerve> I was trying to fill a string with random data, forget a char cast, and Nim called $ for me.
11:26:52FromGitter<kayabaNerve> Is it just me or is that against convention?
11:27:12PMunchHmm, that does seem strange
11:27:14FromGitter<kayabaNerve> I mean, I can't pass an uint to an int function, but I can combine an int with string.
11:27:23FromGitter<kayabaNerve> I can't access an array with an uint
11:27:23PMunchSince $ doesn't automatically convert why would &=
11:27:33FromGitter<kayabaNerve> But I can combine an int with a string.
11:27:40FromGitter<kayabaNerve> This isn't & behavior either
11:28:00PMunchOh you're right
11:28:07*kapil____ joined #nim
11:28:11PMunchWait, what causes it?
11:28:12FromGitter<kayabaNerve> `Error: type mismatch: got <string, int>`
11:28:29PMunchDoes rand return something that can be automatically converted to a string?
11:28:37FromGitter<kayabaNerve> It's an int from the stdlib
11:28:56FromGitter<kayabaNerve> `str &= rand(255)` doesn't throw an error as `str = str & rand(255)` does.
11:29:07FromGitter<kayabaNerve> &= will call $
11:29:29PMunchI just tried myStr &= 5 in "nim secret" and it threw an error
11:30:02FromGitter<kayabaNerve> It fails for me to in nim secret
11:30:09FromGitter<kayabaNerve> It worked when I compiled it though
11:30:25FromGitter<kayabaNerve> Mind doing me a favor and testing Nim, not Nimscript?
11:30:36PMunchAh, but not in regular Nim
11:30:40PMunchYeah I just tried it
11:30:45FromGitter<kayabaNerve> I'm filing a bug
11:31:15PMunchvar myStr = "Hello "; myStr &= 10; echo myStr
11:31:24PMunchEchos "Hello 10" for me
11:31:51PMunch!exec var myStr = "Hello "; myStr &= 10; echo myStr
11:32:04PMunchNimBot, you there?
11:32:13PMunch!help
11:33:24PMunch!eval var myStr = "Hello "; myStr &= 10; echo myStr
11:33:24NimBotCompile failed: <no output>
11:34:30FromGitter<kayabaNerve> PMunch: You on 0.19.X or devel?
11:34:37FromGitter<kayabaNerve> If devel, how old is your devel?
11:35:14PMunch0.19.0
11:35:24narimiransame on devel compiled 2 days ago
11:35:33FromGitter<kayabaNerve> Thanks narimiran
11:35:41FromGitter<kayabaNerve> Did you also test devel Nimscript?
11:35:50PMunchSame on devel compiled 2019-03-06
11:40:03FromGitter<kayabaNerve> https://github.com/nim-lang/Nim/issues/10963
11:40:06FromGitter<kayabaNerve> Thanks for the help
11:42:52clyybberPMunch: Looks like I found another C compiler crashing bug: https://hastebin.com/tiyokexiqo.coffeescript
11:46:01PMunchHmm, that link doesn't appear to work
11:52:17clyybberhuh wierd
11:53:20Araqthere is a variant of 'add' that takes a string and an int, that's why
11:53:31Araqbad idea, we need to deprecate it, yay
11:53:49FromGitter<alehander42> i suspect it makes sense
11:53:56FromGitter<alehander42> because otherwise people would use $number
11:54:02FromGitter<alehander42> which would be slower than number.char?
11:54:11FromGitter<alehander42> but yeah thats not the stdlib problem
11:55:07PMunchThat does two different things though right?
11:55:32FromGitter<alehander42> but for add they would be equivalent
11:55:42FromGitter<alehander42> wait but most numbers are not 1 byte
11:55:43FromGitter<alehander42> nvm
11:55:56PMunchnumber.char would convert number to the ASCII character it represents. And $number would give you a text representation of the number
11:56:14FromGitter<alehander42> woudnt ord do that?
11:58:01PMunchchr would do that
11:58:05PMunchord is the other way around
11:58:14PMunchord('A') returns 65
11:58:22PMunchwhile chr(65) returns 'A'
11:59:17clyybberPMunch: Reported it on github now: https://github.com/nim-lang/Nim/issues/10964
11:59:57FromGitter<alehander42> yeah exactly
12:00:48PMunchclyybber, wait, can you do that for sequences?
12:01:15clyybberYeah
12:02:01*tdc joined #nim
12:04:27*tdc quit (Remote host closed the connection)
12:04:51FromGitter<kayabaNerve> @alehander42 Most numbers aren't one byte. If you want this behavior, it should be done with `$`
12:04:51*tdc joined #nim
12:04:58FromGitter<kayabaNerve> I'm saying the compiler should error
12:05:25FromGitter<alehander42> yes, i agree
12:05:28FromGitter<alehander42> sorry
12:05:29FromGitter<kayabaNerve> Araq: So this has a historical reason, which I don't fully understand myself but okay, but it's going to be phased out?
12:05:36FromGitter<kayabaNerve> Marked deprecated for now, deleted later?
12:05:44FromGitter<kayabaNerve> Just trying to make sure I understood your comments.
12:05:45Araqyes
12:05:47FromGitter<kayabaNerve> @alehander42 All good
12:05:51FromGitter<kayabaNerve> Thanks Araq
12:06:01Araqwe need a custom addInt or something
12:06:31Araqor we optimize 's.add $i' instead
12:08:24clyybberAraq: Are you ok with removing `end` from the list of keywords?
12:08:50Araqbut then how could we ever have 'end if' ?
12:09:00FromGitter<kayabaNerve> Is that a real thing:?
12:09:10FromGitter<kayabaNerve> (in Nim)
12:09:32FromGitter<kayabaNerve> Why do we need that when we have identation? Just trying to learn the purpose of it.
12:09:51FromGitter<kayabaNerve> As someone who has `.start` and `.endX`, I'd love to remove `end` from the keywords list.
12:10:23FromGitter<kayabaNerve> Also `block` but eh, you win some, you lose some. I also don't actually expect either to be removed...
12:10:53Araqbecause 10 years from now people will wake up and see that there is no reason they cannot look at source code in their preferred style
12:12:01FromGitter<kayabaNerve> If end wasn't a keyword, you could write an end macro to achieve your preferred style.
12:12:40AraqI doubt this would work but I never considered it, nice idea
12:12:50clyybberAlso 10 years from now, I believe editors would support source code restyling
12:13:39Araqthe editors have an easier time to render 'end' if 'end' isn't a taken word in your source code
12:16:17clyybberit's really easy either way, if the editor has a concept of scope.
12:16:33clyybberjust paint an end when a scope closes.
12:17:22FromGitter<arnetheduck> you can already get seamless local code restyling in most modern languages (within the bounds of their syntax) using their native formatter (`clang-format` etc) and git checkout filters.. but even the most ardent my-own-style-supporters I've worked with give up after a while because it's such a bother... it's not like one style or another makes *that* much difference once you've gotten used to them (as long as
12:17:22FromGitter... they're both logically consistent)
12:17:26clyybberand if people don't write `end if` now, why should they do so in the future.
12:20:43*rnrwashere joined #nim
12:25:16*rnrwashere quit (Ping timeout: 250 seconds)
12:26:20Araqarnetheduck: clang-format and git checkout filters are intrusive, I dream about editor-only views
12:27:10Araqit's not that important of course but if your editor is a billion lines of code it might as well try to solve some "social" problems
12:29:03WilhelmVonWeineris there a way to assign the result of a call to a variable and use that in a while at the same time
12:29:57WilhelmVonWeinerso instead of something like `while x = function(): # do thing
12:30:07narimiranvar sth = true; while sth: sth = func() ?
12:30:20WilhelmVonWeiner*so, something like
12:32:07clyybberAraq: So yay or nay for a PR removing `end` from keywords?
12:32:34clyybberWould it break source code filters or nim.cfg ?
12:32:45Araqno.
12:32:47WilhelmVonWeinernarimiran: is there no way to make that one line then
12:33:25Araqwhile (x = function(); x): iirc
12:36:15WilhelmVonWeinerthanks
12:41:14narimiranPMunch: binaryparse doesn't work with nim devel, don't know if i already told you?
12:41:28PMunchOh, no I didn't know that
12:41:51narimiranbinaryparse.nim(476, 22) Error: internal error: environment misses: :tmp
12:42:36PMunchHmm, that's not good
12:43:46PMunchWhat does that error even mean :S
12:44:20FromGitter<arnetheduck> btw, is there a way to make a conditional include? for wasm, I'm using os:standalone which requires a panicoverride which is kind of annoying.
12:44:53PMunchAs in "when something: include whatever"?
12:45:00FromGitter<arnetheduck> and b) do we already have a feature to use a different system.nim? I've been thinking about making an exception-free version of it
12:45:14FromGitter<arnetheduck> no, as in, "include this file if it exists"
12:45:23FromGitter<arnetheduck> for "soft" extension points
12:45:56FromGitter<mratsim> when defined(foo): import bar else: import baz
12:46:37FromGitter<mratsim> and you can do when compiles(import foo): import foo
12:46:56FromGitter<arnetheduck> right, when compiles might work
12:47:01PMuncharnetheduck, when fileExists("file.nim"): include "file"
12:47:23FromGitter<arnetheduck> when fileExists won't take include path into account, I suspect
12:47:29FromGitter<mratsim> like here: https://github.com/mratsim/Arraymancer/blob/master/src/io/io.nim#L5-L17
12:47:33PMunchNo it won't
12:47:54FromGitter<arnetheduck> @mratsim spot on
12:48:52PMunchwhen compiles is a but dodgy though..
12:49:13PMunchIf the library had an error in it then it would just silently not got included
12:49:16FromGitter<mratsim> well it's the workaround of the last resort
12:49:32PMunchTrue
12:49:43FromGitter<mratsim> I also use it to check if something returns void because type(foo) crashes when foo is void
12:49:59PMunchI'd make it when compiles or defined(overrideImport) or something like that at least
12:50:17PMunchSo if you get errors and can't understand why it doesn't import it then you can force it to
12:51:09PMunchmratsim, I used it for the same thing when playing around with options. If it had a return value then it would return Some(value) otherwise it wouldn't return anything.
12:51:28PMunchThat should probably be implemented as it's own check though..
12:51:52FromGitter<alehander42> i used it in gara
12:51:53FromGitter<alehander42> afaik
12:52:10FromGitter<alehander42> to generate different code depending on the types of different runtime values
12:52:23FromGitter<alehander42> but maybe it was just when something is X
12:52:27FromGitter<alehander42> not compiles
12:57:19Araqarnetheduck: there is --lib for the path to system.nim but you need to try it, I don't remember using it
12:59:55*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:00:22*mosORadi quit (Quit: Connection closed for inactivity)
13:01:51PMunchHmm, alehander42, gara looks interesting
13:03:26narimiranPMunch: don't tell me you haven't heard off gara before, and you never used it?
13:03:44PMunchNope, never heard of it
13:06:04narimiranit is one of the few nimble packages i have installed and used
13:07:47clyybberNice, using bitops' trailing zeros smoothsort is now ~10% faster
13:07:57clyybberthats intrinsics for ya
13:10:44shashlickPMunch how is nimlsp doing
13:10:58shashlickAm thinking of adding suggest to feud
13:11:02PMunchshashlick, well it still works :)
13:11:42PMunchHaven't really added much to it lately though
13:11:48shashlickDoes it also handle linting or is that separate
13:12:29shashlickSyntax checking
13:12:35PMunchEvery time the file is saved it runs a check on it and notifies of any potential errors
13:13:13shashlickOk so the lsp handles both suggestions as well as syntax - that's good
13:13:28shashlickIs that part of the standard protocol
13:13:32PMunchYup
13:14:17PMunchWell, it isn't really syntax checking. It pretty much just compiles the project and returns any errors
13:15:36PMunchnarimiran, looking at binaryparse now. Not quite sure what the issue is though..
13:15:59narimiranme neither (just by reading the error message)
13:16:32PMunchI tried copy-pasting the output from the macro into the code and that works fine
13:16:48PMunchIt seems like something changed around generated symbols..
13:20:34shashlickPMunch will be cool to get into this table
13:20:38shashlickhttps://langserver.org
13:22:33PMunchShould just be to make a PR to github.com/langserver/langserver.github.io/pulls
13:22:36*nsf quit (Quit: WeeChat 2.4)
13:24:56PMunchHmm, I should set up a git-bisect script for Nim versions
13:25:11PMunchTo figure out which exact commit causes my code to break
13:32:00clyybberHow can I provide both arguments of a template with two untyped arguments as a code block?
13:33:22clyybberNevermind, figured it out.
13:33:43narimiranblock?
13:38:23clyybberI did it like this now:
13:38:41clyybbersometempl (var some = 1):
13:38:50clyybber someothercode...
13:39:17clyybberwhere `var some = 1` is the first, and `someothercode...` the second untyped parameter
13:45:21PMunchclyybber, the do syntax should do that
13:46:34PMunchhttp://ix.io/1FiI/Nim <- like that
13:50:49clyybberPMunch: Thanks!
13:51:04PMunchNo problem :)
13:51:21livcdhmm google shows Araq's pic next to some german archeologist from Potsdam
13:51:34PMunchHaha, where?
13:56:33livcdjust google Araq ^^
13:57:47PMunchIt just autocorrected me to Arak, the drink
13:58:46PMunchGuess that says more about my googling history than anything else..
13:59:41PMunchHmm, same thing happens with a private window
14:05:46PMunchHmm, if I want to find all 6 character numbers in a bunch of strings, what would you use
14:05:59PMunchI guess a good ol' regex would work
14:06:16narimiran"i know, i'll use regex!" :D :D
14:08:18*seni joined #nim
14:14:12Zevvno no no
14:14:14Zevvuse PEGs
14:14:38ZevvPMunch: give me your string, I make you a parser :)
14:14:44ZevvI need testers
14:15:14PMunchI have a bunch of random strings
14:17:31*kali___ is now known as kaliy
14:17:32Zevv6-digits only, no less no more, right?
14:17:45PMunchYup
14:18:11Zevvhttp://paste.ubuntu.com/p/yqqMwZwz8x/
14:18:40Zevvor, if you don't want them in a seq but want to handle them in code: http://paste.ubuntu.com/p/QpqF2Bs2BK/
14:18:45*Trustable joined #nim
14:18:55PMunchnarimiran, according to git bisect e8747059710370819800bdc0742fa86761c6737b was the first commit that broke binaryparse
14:19:53PMunchZevv, I stillk think [0-9]{6} is easier..
14:20:01Zevv:)
14:22:06*PMunch quit (Remote host closed the connection)
14:25:43*PMunch joined #nim
14:25:57PMunchnarimiran, https://github.com/nim-lang/Nim/issues/10192 that seems related
14:26:00*PMunch quit (Remote host closed the connection)
14:28:33*sealmove joined #nim
14:30:11*I_Right_I joined #nim
14:30:32livcdwhere do I place the libwinpthread*.dlls ? It says on the website to place it where I have nim.exe but I do not have nim.exe yet i am building from source
14:31:09Araqnot nim.exe, <yourprogram>.exe
14:32:37livcdi am just building the compiler
14:33:11leorizethen you wouldn't need it?
14:33:29leorizea mingw installation should have that library included
14:35:29livcdhmm it has but i just installed the whole mingw. Restarted the cmd and re-ran the build.bat and it works
14:48:45*a_b_m quit (Ping timeout: 255 seconds)
14:49:12sealmovewhy ` numChars*: set[char] = {'0'..'9', 'a'..'z', 'A'..'Z'}` in the lexer?
14:49:33sealmoveshouldn't it be `'a'..'f'`?
14:51:42FromGitter<mratsim> where is this and what is it used for?
14:51:59Zevvsealmove: that's for hexatrigesimal numbers
14:52:14FromGitter<mratsim> You at least need to be able to parse 0o123 for octals
14:52:41FromGitter<mratsim> and 0xABCDEF for hexa
14:53:07sealmoveZevv: nice one :D mratsim: thx for explanation, missed that
15:40:34*vlad1777d quit (Ping timeout: 250 seconds)
15:40:35clyybberAnybody know if c-blake is on IRC?
15:44:38*Cthalupa quit (Ping timeout: 245 seconds)
15:47:31*Cthalupa joined #nim
15:48:13dom96so yesterday I actually had a pretty nice experience getting openssl DLLs for Windows. Bintray is awesome. Highly recommend for anyone else still running super old openssl DLLs
15:55:12planetis[m]hey sealmove what's up?
16:02:44Araqhttps://www.youtube.com/watch?v=OFgxAFdxYAQ
16:12:48*nsf joined #nim
16:13:23*rnrwashere joined #nim
16:21:44*rnrwashere quit (Remote host closed the connection)
16:23:37*a_b_m joined #nim
16:25:02*neceve quit (Ping timeout: 245 seconds)
16:25:16*solitudesf joined #nim
16:25:43*neceve joined #nim
16:28:55*rnrwashere joined #nim
16:33:27*rnrwashere quit (Remote host closed the connection)
16:50:58*rnrwashere joined #nim
16:52:19Zevv"what can you cram in your own cache, that's where your performance goes"
16:55:25*rnrwashere quit (Ping timeout: 258 seconds)
17:00:09*rnrwashere joined #nim
17:03:35*neceve quit (Ping timeout: 246 seconds)
17:03:57*neceve joined #nim
17:04:12*chimez joined #nim
17:08:44*rnrwashere quit (Remote host closed the connection)
17:09:22*rnrwashere joined #nim
17:12:05*rnrwashere quit (Remote host closed the connection)
17:12:53*rnrwashere joined #nim
17:18:24clyybberI hope that RISC-V gets an extension for control over L-Caches
17:18:40clyybbers/control/manual control
17:22:43*rnrwashere quit (Remote host closed the connection)
17:23:55Zevvhow would
17:24:14Zevvyou typically use that?
17:24:44clyybberno, but I imagine ICC uses it
17:25:11Zevvah right
17:25:20clyybberI mean "manual" control as in some compiler could use it
17:25:29clyybberto get more performance
17:25:34Zevvyeah that makes sense
17:27:26Araqclyybber: it's not clear it can help that much, what's the compiler gonna do? "Please load this value, it'll be used 300 instructions later on" .. well you can produce a load instruction already
17:31:38clyybberAraq: Extending loading values in cache to whole memory regions which can be specified manually?
17:32:41clyybberThe compiler should also be able to make much more sane assumptions about which values are gonna be used in the future as opposed to some often undeterministic heuristics.
17:33:03clyybberwhich are found on todays processors
17:34:08*rnrwashere joined #nim
17:34:48CcxWrkHow do I register filedescriptors with eventloop?
17:37:15*rnrwashere quit (Remote host closed the connection)
17:38:32dom96CcxWrk: Which event loop? Asyncdispatch?
17:39:06CcxWrkYeah. I want to handle stdio and pipes to spawned child in async manner.
17:39:32*rnrwashere joined #nim
17:39:43CcxWrkI could write own select loop, but I figured I might as well try asyncdispatch.
17:42:22FromGitter<arnetheduck> regarding modules and names.. what would the chances be of adding nesting? we're starting to have a bit of a problem in that if we have module_a/util and module_b/util, they're.. hard.. to import or name sanely (yeah, can rename every time but it's a bother)..
17:42:42CcxWrkAh, asyncdispatch.register() apparently.
17:43:53FromGitter<arnetheduck> also, error message is slightly confusing.. if I create `a/util.nim` and `b/util.nim`, then import both, error message complains about nimble, even though there's no nimble in sight: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ca64258a0790b29c95fd3d7]
17:46:08disruptekwrt editors, i don't see why we can't write in any syntax we want and then pass AST to the compiler.
17:46:56disrupteki mean, we can compile brainfuck to binary with xpegs. seems like we aren't that far away, right?
17:47:03clyybberdisruptek Thats an interesting idea. I don't know any editor that does this though.
17:47:58CcxWrkIs it possible to switch to the poll implementation? It would make the debugging slightly easier.
17:52:19*Trustable quit (Remote host closed the connection)
17:52:31disruptekno editor does it, because it's not the job of the editor per se.
17:52:42disruptekit would be an extension to langserver.
17:54:41disruptekAraq: any thoughts on this? https://github.com/nim-lang/needed-libraries/issues/104
17:55:42*clyybber quit (Quit: WeeChat 2.4)
17:56:22*clyybber joined #nim
17:56:24FromGitter<alehander42> Disrupted ⏎ I
17:56:36FromGitter<alehander42> Ve worked on a idea like this
17:57:14FromGitter<alehander42> It let's you define bidir grammars to parser and generate the same ast in different syntaxes
17:57:50FromGitter<alehander42> But it was very prototype
17:58:16disruptekdid it work?
17:58:17CcxWrkThere was a period when the idea of AST-based editing was popular. They... weren't very good usability-wise.
17:58:37Araqarnetheduck: it was on my todo but got cancelled, I need package.module.identifier to be unique
17:58:42CcxWrkBut that might be slightly off from what you are talking about.
17:59:35disrupteki'm just thinking you could hack the syntax a bit with a simple patch, say to introduce curly braces if you wanted them, etc. but, you could of course go further, too...
17:59:39CcxWrkIs there an easy way to drop into gdb (or any other debugger) on assertion error?
18:00:11disruptekrun your binary with gdb?
18:01:52*kobi7 joined #nim
18:02:17CcxWrkInferior 1 (process 32550) exited with code 01
18:02:54Araqbreak exit
18:04:36CcxWrkThanks. :)
18:05:37Araqso my motherboard has a plug it says "D-Link"
18:06:04Araqand there is a cable that would fit in, is it a good idea to do that?
18:06:04disrupteklucky.
18:06:35CcxWrkaddRead and addWrite say that returning false from callback will make it not run again. Either my logic is wrong (quite possible), or that's not what happens.
18:16:13disruptekcliff says memory latency hasn't improved. well, duh, the speed of light is a constant. o.O
18:16:38Zevvthats his point. nothing to be gained there
18:16:59disrupteki know, but it was embarassing to hear him say it. :-P
18:18:04ZevvNah, it's nice to be remenbered that a computer is still a physical machine in the physical world.
18:19:09*narimiran sings Zevv's comment in Madonna's voice
18:21:12ZevvThe meter is just not quite right :)
18:21:14CcxWrkYeah, it seems that my read callback is getting called despite returning false. Do I need to go out of my way and unregister() and register() the fd?
18:21:35*theelous3_ joined #nim
18:22:26narimiranZevv: gaaah, i know, and it bothers me to. but when i saw "a X Y in a X world", the melody started in my head automatically
18:22:40Zevvmusical pattern matching
18:22:51disruptekso let's see if we can guess your age.
18:23:02disruptekyou're about 40?
18:23:31narimirandisruptek: haha, nah, i just behave like one :P
18:26:12narimiran(disclaimer: i'm *younger* than 40, not older :P)
18:26:27*chimez quit (Quit: chimez)
18:37:34*clyybber quit (Quit: WeeChat 2.4)
18:38:22*clyybber joined #nim
18:44:13clyybberarnetheduck: How did chaos unicorn day go?
18:44:17*clyybber quit (Quit: WeeChat 2.4)
18:44:58*clyybber joined #nim
18:45:35FromGitter<arnetheduck> clyybber, well, devs where happy - gonna make it regular most likely: https://notes.status.im/DeeWO2TGSVy7PeJiNIfmpQ?view
18:46:53clyybbernice
18:59:27*tdc quit (Quit: Leaving)
19:01:42*cyraxjoe quit (Ping timeout: 245 seconds)
19:02:08*cyraxjoe joined #nim
19:10:42disruptekis there a nim.cfg statement that relaxes !tabulators?
19:11:23CcxWrkHow do I generate .c file without compiling?
19:12:09disruptekCcxWrk: check your ~/.cache/nim
19:13:00shashlick-c, --compileOnly compile Nim files only; do not assemble or link
19:13:01Zevv-c
19:13:41CcxWrkThanks.
19:13:49Zevv--your-welcome
19:14:03Zevvooh, --youre-welcome, of course
19:16:40disruptekit's odd that statement lists on the righthand side of an assignment are special expressions, so you cannot `foo = "bar" & case ...`
19:20:24Zevvtrue, I never noticed that
19:20:36Zevvput it in brackets and all is fine
19:21:20*uvegbot quit (Read error: Connection reset by peer)
19:21:32Zevvhttp://paste.debian.net/1076130/
19:23:01disrupteki can't decide if it's a bug, but in terms of behavior of least surprise, this ain't it. ;-)
19:27:46FromGitter<liquid600pgm> I guess the rough EBNF notation for this would be: ⏎ ⏎ ```expr → caseExpr | ifExpr | infix | ...``` [https://gitter.im/nim-lang/Nim?at=5ca65ab231aec969e8516e94]
19:28:01FromGitter<liquid600pgm> that's why it's disallowed
19:28:50disruptekyes, but it seems like a defect. in any case, the error message should be polished.
19:29:27disruptekwe cannot call an if statement an expression in one instance and then complain that an expression was not found in another.
19:29:55Zevvjust wondering: when someone pastest something on gitter, I get a link on IRC showing this ᵗᶦⁿʸ little window with the code
19:30:01Zevvis that how everybody sees it on gitter?
19:30:06*mosORadi joined #nim
19:30:30Zevvhttps://zevv.nl/div/tiny.png
19:30:48narimiranno, link on gitter is of normal size for me
19:31:02narimiranoh, it is narrow for you
19:31:07narimiranbottom-right, click on it
19:31:08disrupteki got that too, but i suppose if you sign in to gitter, it's a little nicer looking.
19:31:14*crem quit (Ping timeout: 250 seconds)
19:31:35narimiranthis "fake hamburger menu" will collapse the right column
19:32:19Zevvyes that helps a bit, thanks
19:32:29ZevvI'd love to get a link to only the snippet, more pastebin like
19:32:51*kobi7 quit (Quit: Leaving)
19:33:14disruptekthe gitter link adds nothing. i'd rather see a syntax-highlit rendering at worst, and a paste with syntax highlight at best.
19:33:39FromGitter<liquid600pgm> (https://files.gitter.im/nim-lang/Nim/3dsz/image.png)
19:33:43FromGitter<liquid600pgm> so I tried using Srain for IRC
19:33:56FromGitter<liquid600pgm> to see how code blocks look
19:34:00disruptektry channel #nim.
19:34:08*lqdev joined #nim
19:34:15FromGitter<liquid600pgm> oh seriously!?
19:34:17disruptekhooray
19:34:53FromGitter<liquid600pgm> what's the `#` for, I thought it was implicit
19:35:15disruptekit denotes `channel`.
19:36:06FromGitter<liquid600pgm> I understood that part, I'm asking why is it needed when connecting
19:36:36disruptekbecause otherwise, the irc client doesn't know how to resolve the symbol.
19:37:15FromGitter<liquid600pgm> anyways, here goes the test: ⏎ ⏎ ```proc abc(a, b: int): int = a * b + int(a / b) ⏎ echo abc(1, 2)``` [https://gitter.im/nim-lang/Nim?at=5ca65ceb016a930a45635812]
19:37:25disrupteki mean, there may not be a valid technical reason for it; it's convention.
19:37:34FromGitter<liquid600pgm> thank you, good to know
19:38:23disruptektest from irc land: ```proc abc(a, b: int): int = a * b + int(a / b)
19:38:26disruptekecho abc(1, 2)```
19:38:40disruptektest from irc land: ```proc abc(a, b: int): int = a * b + int(a / b); echo abc(1, 2)```
19:38:49FromGitter<liquid600pgm> yeah, that code fence doesn't work, it shows up as two separate messages
19:39:11disruptekor as if i merely `backticked it`.
19:41:25*clyybber quit (Quit: WeeChat 2.4)
19:42:09lqdevfence test from IRC: ```
19:42:23lqdevyeah that won't work, shift+enter doesn't make a line break
19:45:17FromGitter<liquid600pgm> I'm staying with Gitter for now, even though I don't like their web app
19:45:28FromGitter<liquid600pgm> it allows me to share code rather easily
19:45:54*rnrwashere quit (Remote host closed the connection)
19:53:41*lqdev quit (Remote host closed the connection)
20:04:00*narimiran quit (Remote host closed the connection)
20:06:24CcxWrkWhy does repr() for string containing newline ends with \10", then literal newline and then ""?
20:08:51*matthiaswh quit (Quit: matthiaswh)
20:11:00FromGitter<bluenote10> I have a nimble question: How can I exit/quit from a nimble task with an error code? If I do `return` the task stops, but I cannot find a way to return a non-zero exit code.
20:12:10*sz0 quit (Quit: Connection closed for inactivity)
20:14:29FromGitter<bluenote10> and using `quit(1)` gives an annying hint "quit called" that I don't want
20:16:08*jjido joined #nim
20:19:28disruptekbluenote10: quit("", 1)
20:20:34*kapil____ quit (Quit: Connection closed for inactivity)
20:21:24*NimBot joined #nim
20:22:25*floppydh quit (Quit: WeeChat 2.4)
20:25:53*matthias__ joined #nim
20:26:32*matthias__ quit (Client Quit)
20:29:36FromGitter<bluenote10> That still prints the hint
20:30:07disrupteknot for me.
20:30:44disruptekare you calling system.quit or some other quit?
20:31:36FromGitter<bluenote10> according to the hint I've called system.quit
20:31:50disruptekactually, system quit doesn't produce any output at all in devel.
20:32:53FromGitter<liquid600pgm> disruptek: are you checking `system.quit` with nimble? it never produced any output AFAIK, it may be nimble that's printing the hint
20:32:53disruptekoh sorry, i missed that this was a nimble question. i don't use nimble. :-/
20:33:55FromGitter<bluenote10> `hint("QuitCalled", false)` also doesn't work, I guess I give up
20:34:38*d10n-work joined #nim
20:35:43CcxWrkHrm, epoll doesn't know how to write to /dev/null
20:35:44*vlad1777d joined #nim
20:35:51disruptekto me, nawabs makes much more sense if you value reproducability.
20:36:07CcxWrk> epoll_ctl(3, EPOLL_CTL_ADD, 1, {EPOLLOUT|EPOLLRDHUP, {u32=1, u64=1}}) = -1 EPERM (Operation not permitted)
20:36:09CcxWrk> Error: unhandled exception: Operation not permitted (code: 1) [IOSelectorsException]
20:36:10*Perkol joined #nim
20:36:22CcxWrkCould I just use poll() instead? Is there some define I can use?
20:38:30CcxWrkor select() according to docs, but I see ioselectors_poll.nim and it's using posix.poll()
20:38:35FromGitter<bluenote10> yes I also like nawabs more, but I still want to offer a nimble config
20:39:10*nsf quit (Quit: WeeChat 2.4)
20:55:48*Cadey joined #nim
20:57:17*Cadey quit (Client Quit)
20:57:31*Cadey joined #nim
21:10:18*Cadey quit (Quit: WeeChat 1.9.1)
21:11:19*Cadey joined #nim
21:12:26*solitudesf quit (Ping timeout: 246 seconds)
21:14:26FromDiscord<exelotl> god
21:15:01FromDiscord<exelotl> my arch nemeses shl/shr strike again
21:16:36FromDiscord<exelotl> I get left and right mixed up a lot... so I make far fewer mistakes in languages that use << and >>
21:23:17*cyraxjoe quit (Ping timeout: 246 seconds)
21:23:44*cyraxjoe joined #nim
21:26:13*Perkol quit (Quit: Leaving)
21:27:50*Vladar quit (Remote host closed the connection)
21:39:48*mosORadi quit (Quit: Connection closed for inactivity)
21:53:45FromGitter<zetashift> I prefer shl/shr, but you could just define those as operators no?
21:54:22*Xe quit (Quit: *.yolo *.swag)
21:57:01*Cadey quit (Quit: WeeChat 1.9.1)
21:57:11*Xe joined #nim
22:18:45*a_b_m quit (Quit: Leaving)
22:23:41*rnrwashere joined #nim
22:43:31*jjido quit (Quit: Connection closed for inactivity)
22:48:34FromGitter<arnetheduck> btw, Araq, the new owner thing, would it cover the following scenario: ⏎ ⏎ 1) I have some `state` which is a ref object ⏎ 2) I compute a cache over that `state` ⏎ 3) I want to make sure that the `state` does not change while the cache "exists" (by scoping cache object) ... [https://gitter.im/nim-lang/Nim?at=5ca689c2759abc043c696dc1]
22:52:38*jjido joined #nim
22:55:00*krux02 quit (Remote host closed the connection)
22:55:16*sealmove quit (Quit: WeeChat 2.4)
22:55:26*seni quit (Quit: Leaving)
23:04:49federico3can I get the compiler to list unused procs in a imported module?
23:08:35*rnrwashere quit (Remote host closed the connection)
23:11:42*ng0 quit (Quit: Alexa, when is the end of world?)
23:32:24I_Right_II come from a C back ground. In the past when I have used libraries in c++ that use "try & catch" I have seen all sorts of trouble with it oppose to most c error handling schemes. Should I have such concerns when using nim's "raise,try & except"?
23:33:16*lritter quit (Quit: Leaving)
23:41:33*Xe quit (Quit: WeeChat 1.9.1)
23:41:45*Xe joined #nim
23:44:21*Cthalupa quit (Ping timeout: 244 seconds)
23:45:42*Cthalupa joined #nim
23:51:07*noeontheend joined #nim
23:55:57*stefanos82 quit (Remote host closed the connection)