00:00:18 | enow | zestyr: ah really I was thinking ffmpeg first of all |
00:00:25 | * | brainproxy joined #nim |
00:00:39 | enow | zestyr: then I figured I might as well mash a lot of jpegs ontop of each other |
00:00:56 | zestyr | you'd still need to encode that into a stream though? |
00:01:01 | enow | which would be mjpeg, in a nutshell. |
00:01:04 | zestyr | yep |
00:01:05 | enow | zestyr: not for mjpeg |
00:01:35 | enow | zestyr: but I'd love to see it happen with ffmpeg in some time |
00:01:55 | enow | thing is if you can control I and P frames you can achieve a lot of things |
00:02:01 | zestyr | https://github.com/phoboslab/jsmpeg-vnc/blob/master/source/encoder.c |
00:02:06 | * | shpx quit (Quit: shpx) |
00:02:59 | shashlick | enow - will need to open a bug against tree-sitter since it doesn't understand this inline #define |
00:03:17 | enow | hm MPEG1 I wouldn't bother with ffmpeg for that |
00:03:52 | zestyr | it becomes a little more complicated when you want audio as well |
00:03:54 | enow | so you've fixed some errors from the interop side of things? |
00:06:52 | enow | zestyr: it does |
00:07:23 | enow | not to start a flamewar, but isn't this sorta kinda what pulseaudio is designed for |
00:08:20 | * | shpx joined #nim |
00:10:04 | zestyr | well it can be used as a remote audio server, but that's definitely not its most popular usage. and you know, good luck syncing a list of jpegs with an audio stream you don't have much control over |
00:15:47 | enow | zestyr: fine fine if you want to use it to bypass corporate youtube polices |
00:18:13 | * | skellock joined #nim |
00:28:48 | * | absolutejam quit (Ping timeout: 245 seconds) |
00:29:00 | * | krux02_ joined #nim |
00:31:26 | * | skellock quit (Ping timeout: 250 seconds) |
00:31:55 | * | krux02 quit (Ping timeout: 250 seconds) |
00:34:56 | * | leorize joined #nim |
00:35:19 | * | krux02_ quit (Remote host closed the connection) |
00:37:34 | * | shpx quit (Quit: shpx) |
00:41:31 | * | shpx joined #nim |
00:42:45 | * | shpx quit (Client Quit) |
00:43:30 | * | ryukoposting joined #nim |
00:45:44 | ryukoposting | ...anyone here |
00:46:13 | FromDiscord_ | <moerm> see you |
00:46:29 | ryukoposting | woahdude.jpg |
00:46:56 | ryukoposting | hey so I noticed something weird when I moved from 0.18 to 0.19, and i was wondering if someone could help |
00:47:06 | ryukoposting | I'm still pretty new to nim though, so I might just be dumb |
00:47:08 | zestyr | what's the problem? |
00:49:56 | ryukoposting | so, I had a macro that took a typedesc as a parameter. The macro had a few if statements looking at the typedesc, i.e. `if T is string`. When I moved from 0.18 to 0.19, `if T is string` no longer worked as it did before. `if getType(T) is string` also doesn't work either. Then, I tried doing `if getType(T).repr == "typeDesc[string]"`, and that worked |
00:51:14 | ryukoposting | this is for a library that I'm gonna put up on nimble once it's stable btw |
00:51:14 | * | vlad1777d joined #nim |
00:55:20 | enow | shashlick: that's fantastic |
00:55:25 | enow | shashlick: that's fantastic |
00:55:52 | enow | sorry! wrong terminal in focus |
00:56:28 | ryukoposting | zestyr any ideas? I'm fairly new to nim, so idk if I'm just dumb or if it's a regression |
00:59:48 | * | enow quit (Quit: leaving) |
00:59:56 | * | shpx joined #nim |
01:03:57 | * | dom96_w joined #nim |
01:04:36 | shashlick | Worth checking the changelog |
01:04:40 | shashlick | https://nim-lang.org/blog/2018/09/26/version-0190-released.html |
01:05:47 | shashlick | ryukoposting: this seems related |
01:05:50 | shashlick | https://github.com/nim-lang/Nim/issues/8126 |
01:11:17 | ryukoposting | thanks shashlick |
01:30:15 | * | dom96_w quit (Quit: Textual IRC Client: www.textualapp.com) |
01:38:23 | * | vlad1777d quit (Ping timeout: 245 seconds) |
01:52:39 | * | skellock joined #nim |
01:56:51 | * | rockcavera quit (Remote host closed the connection) |
02:01:41 | * | xet7 quit (Remote host closed the connection) |
02:10:14 | * | shpx quit (Quit: shpx) |
02:12:26 | * | zachk quit (Quit: Leaving) |
02:18:17 | * | xace quit (Read error: Connection reset by peer) |
02:19:17 | * | xace joined #nim |
02:19:18 | shashlick | enow: okay - JBLOCK is also working now - only thing not working is the struct with #defines in the middle and I need tree-sitter to fix that |
02:19:45 | shashlick | for the near term, you can simply copy that one struct out, remove the defines and run it through nimterop |
02:20:11 | shashlick | then you can hard code that and run the rest of the file in an automated fashion |
02:21:02 | shashlick | another option is to edit the file before running it through nimterop, and then restore it back |
02:49:34 | * | dddddd quit (Remote host closed the connection) |
03:00:35 | * | banc quit (Quit: Bye) |
03:15:51 | * | banc joined #nim |
03:46:45 | * | lritter quit (Ping timeout: 268 seconds) |
03:47:15 | * | lritter joined #nim |
04:01:10 | * | ofelas quit (Ping timeout: 250 seconds) |
04:09:13 | * | nsf joined #nim |
04:12:38 | * | tefter quit (Read error: Connection reset by peer) |
04:14:06 | * | brainproxy quit (Quit: WeeChat 2.3) |
04:51:00 | * | skellock quit (Ping timeout: 250 seconds) |
04:56:26 | * | darithorn quit (Quit: Leaving) |
05:00:36 | zestyr | http://ix.io/1yre/nim |
05:00:38 | zestyr | test.nim(12, 23) Error: cannot prove: i mod len(list) <= len(list) + -1 (bounds check) |
05:00:46 | zestyr | doing it without parallel works |
05:04:54 | leorize | parallel is kinda buggy atm |
05:05:21 | leorize | you can do some `if` juggling to make it work I believe |
05:06:40 | zestyr | hmm, if I instead do `if i mod len(list) <= len(list) + -1: spawn echo i`, I get this error |
05:06:42 | zestyr | Error: internal error: (filename: "ccgexprs.nim", line: 1012, column: 17) |
05:07:44 | zestyr | even `if 1 < 1: spawn echo i` triggers it |
05:07:50 | leorize | you should file a bug for that |
05:09:46 | zestyr | seems to be because I'm using echo, not the if statement |
05:10:09 | * | kapil____ joined #nim |
05:12:52 | leorize | oh yea, spawn echo got an issue filed by me :P |
05:13:19 | zestyr | damn, and #3528 exists for the bounds check error |
05:14:07 | leorize | parallel is in experimental because it doesn't work well |
05:16:37 | * | leorize quit (Remote host closed the connection) |
05:22:31 | * | skellock joined #nim |
05:35:36 | * | narimiran joined #nim |
05:37:08 | * | skellock quit (Ping timeout: 268 seconds) |
05:51:09 | Tanger | Is there any short hand to represent binary operations on multiple values? i.e, in C you can ~(ECHO | ICANON | ISIG), while in nim I have "and not ECHO or not ICANON or not ISIG" |
05:52:00 | narimiran | erm, those are not equivalent, are they? |
05:53:46 | narimiran | but you can define those operators yourself if you want |
06:13:57 | * | leorize joined #nim |
06:16:28 | * | absolutejam joined #nim |
06:20:45 | narimiran | Tanger: this is something i came up with in 2 minutes, but notice that it is 7AM here and i'm sleepy, so might not be the best :) http://ix.io/1yrj |
06:22:30 | narimiran | just as i posted, i noticed i'm overcomplicating and plain and simple "proc `|`(a, b: bool): bool = a or b" will do the trick :) |
06:23:21 | leorize | Tanger: not(a or b or c)? |
06:23:41 | Araq | usually you use set[enum] instead, Tanger |
06:53:02 | * | krux02 joined #nim |
06:53:31 | * | absolutejam quit (Quit: WeeChat 1.9.1) |
07:13:54 | * | BigEpsilon joined #nim |
07:18:58 | leorize | Araq: can nimsuggest look for a free port automatically? |
07:26:26 | Araq | it should... can you fix it? |
07:35:02 | leorize | sure, what should be the command param for this? --autobind? |
07:35:21 | Araq | yeah |
07:43:53 | * | dvn quit (Remote host closed the connection) |
07:46:24 | * | dvn joined #nim |
07:47:44 | * | xet7 joined #nim |
07:55:41 | * | dvn quit (Quit: bye) |
07:57:33 | * | BigEpsilon quit (Quit: WeeChat 2.4-dev) |
07:58:18 | * | BigEpsilon joined #nim |
07:59:46 | Zevv | Araq: set[enum] will not work with all thes flags coming from C |
07:59:58 | Zevv | I must say I do miss the C idioms as well for bit fiddling |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:04 | Araq | "C idioms"? I would use setBit, testBit, unsetBit instead. |
08:03:26 | * | dvn joined #nim |
08:03:55 | Araq | but it's Nim, overload | if you think it's so "nice". (It's not at all, it's messy, but you're used to it.) |
08:04:15 | Zevv | Nah I do C things in C and Nim things in Nim |
08:04:19 | Zevv | can't have it all |
08:04:40 | * | gmpreussner joined #nim |
08:04:43 | Araq | we should have setBit, testBit, unsetBit and flipBit |
08:05:39 | Araq | x |= (1 << bit) is actually a complex construct |
08:06:23 | Zevv | True, but in embedded its the idiomatic way, and C compilers know just how to handle this |
08:07:01 | Araq | the idiomatic way is a pure anachronism. |
08:07:10 | Zevv | true, reg &= ~((1<<BIT1) | (1<<BIT2)) is very nasty |
08:07:47 | Araq | reg.unsetBits(Bit1, Bit2) it's Nim, we can have things that make sense |
08:08:12 | Zevv | True - that's not yet in bitops, right? |
08:08:47 | * | absolutejam joined #nim |
08:08:52 | absolutejam | morning all |
08:10:09 | Tanger | Thanks for the response Araq, leorize and narimiran! My brain was not functioning logically, haha |
08:13:27 | Araq | Zevv: probably not |
08:13:55 | absolutejam | so, I can't store different types in the same seq right? |
08:14:27 | absolutejam | I tried wrapping it in a type that uses a case statement to declare the field type (seq[foo] or seq[bar]) but that complained that I was redefining the field type |
08:14:47 | absolutejam | Are there any there any other options? Just using different field types per distinct sequence type? |
08:17:46 | Araq | usually yes, but if you have troubles use JSON until you're more familiar with how static type systems |
08:17:53 | Araq | work |
08:29:07 | * | kapil____ quit (Quit: Connection closed for inactivity) |
08:34:47 | * | PMunch joined #nim |
08:54:00 | * | floppydh joined #nim |
09:22:13 | * | ng0 joined #nim |
09:25:50 | oculux | can i ask whether any one is or knows of any group or person working on an Apache Cassandra - Nim driver ? |
09:26:51 | oculux | The only thing holding me back from not completely going towards Golang because of this is the database driver. |
09:34:43 | * | skellock joined #nim |
09:40:01 | * | skellock quit (Ping timeout: 246 seconds) |
09:43:52 | Araq | oculux, I don't know of such a driver but maybe it's not hard to write one. I wrote a Arango client in one day fwiw (still need to release the code...) |
09:52:58 | * | vlad1777d joined #nim |
09:53:43 | PMunch | oculux, there is this: github.com/yglukhov/cassandra |
09:56:13 | leorize | Araq: here's the new nimsuggest option :) https://github.com/nim-lang/Nim/pull/10328 |
09:56:22 | * | Vladar joined #nim |
10:41:00 | zestyr | I just released an ImageMagick wrapper, it's still missing a lot of helper functions and hasn't been test much, but it works! Feedback is welcome :) |
10:41:02 | zestyr | https://github.com/zestyr/nimagemagick |
10:41:13 | PMunch | Oh cool |
10:46:36 | livcd | zestyr: is that whole magickwand.nim machine translated ? |
10:47:00 | zestyr | yea, using nimterop |
10:47:35 | zestyr | with a few manual edits to make it compile, mainly due to a tree-sitter issue |
10:53:19 | PMunch | Hmm, maybe I should have another go at wrapping imlib2 if nimterop has become that good |
10:54:34 | * | lritter quit (Ping timeout: 272 seconds) |
11:00:42 | * | fanta7531 joined #nim |
11:21:45 | * | enow joined #nim |
11:21:58 | enow | Allright I've made some progress on jpeg bindings!! |
11:22:19 | enow | Doing it the manual way just to get the subset I personally need |
11:22:41 | enow | I agree with anyone arguing for an interop approach though |
11:23:40 | enow | Basically I painstakingly copied things from a jpeglib.h header to my own header, until I could get nimgen to run decently on it |
11:24:18 | narimiran | help wanted: https://github.com/nim-lang/Nim/issues/10330 |
11:26:15 | * | Vladar quit (Remote host closed the connection) |
11:28:50 | zestyr | why have the links to the manual and stdlib pages been removed in the top left? those are pretty useful |
11:30:13 | narimiran | zestyr: where? |
11:30:32 | zestyr | in the screenshots, they're still present here though, guess it doesn't matter: https://nim-lang.github.io/Nim/sequtils.html |
11:31:18 | narimiran | zestyr: on the right is my local copy, online version should have them |
11:33:35 | zestyr | yep. great work btw! better documentation is greatly appreciated :) |
11:34:03 | narimiran | thanks :) |
11:34:09 | narimiran | feel free to join ;) |
11:35:41 | * | dddddd joined #nim |
11:35:42 | * | skellock joined #nim |
11:37:49 | * | rockcavera joined #nim |
11:39:40 | * | thomasross quit (Remote host closed the connection) |
11:39:57 | * | skellock quit (Ping timeout: 246 seconds) |
11:40:57 | zestyr | at the top of strutils, it says "$ for converting other data-types to strings", but I can't see any `$` procs defined in strutils? |
11:41:36 | narimiran | it also says, above it: "The *system module* defines several common functions for working with strings" |
11:41:59 | zestyr | oh sorry, didn't read properly.. |
11:47:56 | * | thomasross joined #nim |
11:50:04 | * | thomasross_ joined #nim |
11:50:04 | * | thomasross quit (Killed (leguin.freenode.net (Nickname regained by services))) |
11:50:04 | * | thomasross_ is now known as thomasross |
12:03:08 | * | Tongir joined #nim |
12:19:55 | narimiran | hmmm, anybody else has a problem bootstrapping? |
12:20:58 | * | nsf quit (Quit: WeeChat 2.3) |
12:45:21 | PMunch | Hmm, this happens whenever I try to retrieve a "def" from a symbol within a "quote do:" block. |
12:45:37 | PMunch | i.e. run :LspDefinition in vim |
12:48:03 | absolutejam | that issue is great narimiran |
12:48:54 | narimiran | absolutejam: haha, an issue can be great? :D |
12:49:09 | absolutejam | I mean the work you've done |
12:49:14 | absolutejam | and I also agree on the sentiment |
12:50:47 | narimiran | thanks :) |
12:51:58 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
12:54:36 | PMunch | You should make the list link to the current documentation for each module |
12:54:46 | PMunch | Would make it easier to go through and pick one you want to work on :) |
12:55:05 | narimiran | so link to .nim file? |
12:56:13 | PMunch | I was thinking the hosted docs |
12:56:33 | PMunch | Like linking to this: nim-lang.org/docs/streams.html |
12:58:58 | absolutejam | I'm testing regex online and it works, but it doesn't work when I run it in nim - Is it PHP/PCRE I need to be testing against? |
12:59:07 | absolutejam | using the nre module |
12:59:40 | PMunch | "A regular expression library for Nim using PCRE to do the hard work." |
12:59:46 | PMunch | First line in the nre documentation :P |
12:59:54 | PMunch | So yes it's PCRE you need to test against |
13:00:00 | absolutejam | Derp, thankes |
13:00:21 | PMunch | No problem :) |
13:02:22 | * | zachcarter quit (Ping timeout: 268 seconds) |
13:04:39 | absolutejam | should it be able to return multiple groups from a match? |
13:11:39 | * | skellock joined #nim |
13:15:23 | * | skellock quit (Client Quit) |
13:20:11 | enow | haha I made it |
13:20:16 | enow | libjpeg bindings for nim |
13:21:06 | enow | not by the book in any shape or form, but then again I've only been using the language for a couple of days |
13:21:58 | * | kobi7 joined #nim |
13:22:00 | kobi7 | hi! |
13:22:04 | enow | hi |
13:22:43 | kobi7 | how do I check if a Uri is valid ? |
13:27:14 | enow | kobi7: hm well either you try to curl it or I guess you could find some regular expression for it |
13:27:45 | enow | to fetch it with curl and see what happens gives some overhead so I guess that's not what you have in mind |
13:38:04 | enow | kobi7: rather than stringing together your own regular expression, I suggest looking for a ready made one. There are all sorts of edge cases you'd miss if your doing it on your own |
13:38:36 | enow | kobi7: if regular expressions isn't your cup of tea, and I don't blame you, you might want to check out something like https://github.com/achesak/nim-uri2 |
13:39:25 | * | kobi7 quit (Quit: Leaving) |
13:40:32 | narimiran | enow, kobi7: there is also strscans (https://nim-lang.github.io/Nim/strscans.html) for some simple (often enough) stuff |
13:48:56 | absolutejam | inim |
13:48:58 | absolutejam | oops |
13:58:34 | * | dddddd quit (Ping timeout: 258 seconds) |
14:01:01 | shashlick | Nice work zestyr and enow |
14:01:52 | shashlick | enow, like I pointed earlier, nimterop now does everything in libjpeg except one symbol so you can avoid the manual steps |
14:01:58 | * | nsf joined #nim |
14:02:16 | enow | shashlick: I know :D but I really wanted it doday |
14:02:18 | enow | today* |
14:02:31 | enow | also I learned a great deal |
14:02:52 | shashlick | PMunch - please let me know how nimterop does with imlib2 |
14:03:06 | shashlick | enow - np |
14:03:38 | PMunch | I will when/if I try it :) |
14:04:05 | * | dddddd joined #nim |
14:05:41 | enow | I have a feeling that'll be messing around with nim bindings quite a lot |
14:06:12 | enow | had a chat with the arcan guy about some VR stuff so next week I'm aiming at some integation towards that project |
14:06:46 | shashlick | Neat enow - let me know your feedback on your exclusive experience |
14:06:55 | shashlick | I hope to make it a seamless process |
14:07:08 | shashlick | So the more info I have the better |
14:07:13 | enow | so you'll have to suffer my stupid questions for a bit longer |
14:07:18 | shashlick | Np |
14:07:34 | enow | yeah I'm keeping some notes and probably will string together a blogpost by the end of the week |
14:07:53 | shashlick | Join the nimgen gitter for wrapper related discussions |
14:08:11 | shashlick | Anyone know how to wrap va_list in Nim? |
14:08:39 | enow | I'll check it ou t |
14:23:23 | * | Cthalupa quit (Ping timeout: 245 seconds) |
14:24:04 | * | Cthalupa joined #nim |
14:31:10 | * | Cthalupa quit (Ping timeout: 268 seconds) |
14:31:36 | * | Cthalupa joined #nim |
14:38:10 | * | Cthalupa quit (Ping timeout: 250 seconds) |
14:39:04 | * | Cthalupa joined #nim |
14:39:49 | * | Vladar joined #nim |
14:45:41 | shashlick | do we have any OSX brew package experts here? will be cool to add choosenim |
15:08:18 | absolutejam | oh fudge, the macro I was going to use from the forums to allow [] to access type fields doesn't work |
15:08:40 | absolutejam | and the AST is scary |
15:10:14 | leorize | the ast is really easy to understand |
15:10:49 | leorize | there's also the macros tutorial now, so you can try to play w it :) |
15:13:01 | absolutejam | looking now |
15:13:52 | * | d__ joined #nim |
15:14:16 | * | d__ is now known as Guest98313 |
15:16:03 | * | Guest98313 quit (Client Quit) |
15:19:43 | narimiran | shashlick: i like your SO idea! |
15:21:20 | shashlick | i'm adding SO rss feed to my list |
15:29:54 | * | tefter joined #nim |
15:31:39 | * | PMunch quit (Remote host closed the connection) |
15:31:58 | * | PMunch joined #nim |
15:33:17 | * | Cthalupa quit (Ping timeout: 244 seconds) |
15:33:28 | * | shashlick quit (Remote host closed the connection) |
15:33:49 | * | shashlick joined #nim |
15:34:13 | * | fanta7531 quit (Quit: ...) |
15:35:40 | * | Cthalupa joined #nim |
15:36:32 | * | thomasross quit (Ping timeout: 268 seconds) |
15:41:23 | * | floppydh quit (Quit: WeeChat 2.3) |
15:42:43 | * | tefter quit (Read error: Connection reset by peer) |
15:43:09 | * | tefter joined #nim |
15:43:23 | * | tefter quit (Remote host closed the connection) |
15:46:45 | shashlick | Can someone help answer this - https://stackoverflow.com/questions/54040850/is-nim-similar-to-java-in-its-memory-inefficiency |
15:46:59 | * | kapil____ joined #nim |
15:49:11 | Araq | why would it be "similar"? Nim has a value based object system like C++ and thread local heaps for ultra low GC pauses |
15:50:26 | * | PMunch quit (Remote host closed the connection) |
15:52:23 | Zevv | Araq: I'd like to make a PR for basic bit operations, like this: http://paste.debian.net/1060851/, but I'm not sure where to put them. Do you have an opinion or should I ask dom96? |
15:52:49 | * | Trustable joined #nim |
15:57:20 | absolutejam | how badly will I get hurt for necroing on the forums? |
15:57:32 | absolutejam | it's the exact thread I want to reply to, just really old |
15:57:39 | zestyr | Zevv: bitops.nim? |
15:57:50 | narimiran | absolutejam: it won't hurt |
15:59:07 | Araq | Zevv, bitops.nim |
16:01:29 | Zevv | ok |
16:02:01 | absolutejam | Araq: I can't post because I can't activate my email and the link has expired |
16:02:09 | absolutejam | I don't see anywhere to resend the activation |
16:03:22 | leorize | dom96: ^ |
16:03:24 | narimiran | absolutejam: dom96 is the one who usually deals with that |
16:03:41 | Araq | Zevv, also make these all .inline procs |
16:04:04 | Araq | and add flipBit(s) |
16:04:53 | Zevv | ok |
16:05:05 | Zevv | Should bitNum[T] be exported? |
16:05:24 | absolutejam | ooh sorry |
16:05:25 | Araq | dunno, it's a bit weird. |
16:06:07 | Araq | it makes sense though. maybe name it BitIndex[T] ? |
16:06:21 | Zevv | BitCount[T] ? |
16:06:36 | Zevv | If its not exported, its not in the docs, so the user can not see what's expected there. |
16:06:41 | Zevv | But the thing is a bit cryptic |
16:07:08 | Araq | it's not a Count. BitPosition[T] ? |
16:07:15 | Araq | BitsRange[T]? |
16:07:28 | Araq | something like that. bbl# |
16:07:40 | Zevv | It was bitRange earier, I'll change it back |
16:10:12 | narimiran | "the thing is a bit cryptic" --> i see what you did there ;) |
16:10:53 | Zevv | pun was not intended, but it's quite good actually :) |
16:22:05 | * | ng0 joined #nim |
16:25:02 | Zevv | Can anyone explain to my why this is not valid: http://paste.debian.net/1060859/ |
16:25:11 | Zevv | I'm not allowed to make a varargs[] of a range? |
16:26:14 | zestyr | why is the procvar pragma not documented? it's mentioned twice in the manual |
16:27:20 | leorize | Zevv: It looks like int was matched instead of Myrange |
16:27:36 | leorize | try converting the first literal to Myrange |
16:27:48 | leorize | zestyr: because it's not really used I suppose? |
16:28:16 | Zevv | leorize: yeah, that works. But that kind of defies the purpose of using ranges for the API, this is not really usable this way |
16:28:36 | Zevv | I'll have to wrap it in a template probably |
16:29:09 | Zevv | hm, but how |
16:31:40 | zestyr | leorize: searching procvar in the stdlib yields 58 results (unicode.nim and strutils.nim for example), and I've seen at least a couple nimble packages using it |
16:33:52 | * | absolutejam quit (Ping timeout: 250 seconds) |
16:35:13 | leorize | zestyr: https://github.com/nim-lang/Nim/commit/08f5087d2c4f96ca6b82c1feed2f25c4e1f9f9b6 |
16:35:13 | Zevv | leorize: is it actually supposed to match on ints instead of the type in the varargs? |
16:35:54 | Zevv | ah it is implicitly transformed to an array, so the matching goes haywire |
16:36:23 | leorize | try varargs[myrange, myrange]? |
16:36:36 | zestyr | leorize: oh, thanks |
16:37:41 | Zevv | multiple types in a varargs? |
16:38:13 | leorize | you can perform type conversions within the varargs |
16:38:33 | Zevv | aah |
16:38:47 | Zevv | smart! |
16:40:25 | * | NimBot joined #nim |
16:41:38 | Zevv | yeah, *almost*. But now it breaks down because my range is actually a generic type: http://paste.debian.net/1060865/ |
16:41:56 | Zevv | identifier expected, but found 'BitsRange[T]' |
16:52:02 | Zevv | yeah, it seems that semVarargs() only expects idents or quoted idents as 2nd argument. Pushing generics to the limit :) |
16:53:43 | Zevv | nkBracketExpr is not allowed there |
17:13:35 | * | BigEpsilon quit (Quit: WeeChat 2.3) |
17:16:37 | * | Tyresc joined #nim |
17:17:41 | * | PMunch joined #nim |
17:21:07 | * | narimiran quit (Remote host closed the connection) |
17:24:57 | * | Trustable quit (Remote host closed the connection) |
17:30:04 | * | skellock joined #nim |
17:32:46 | * | Snircle quit (Read error: Connection reset by peer) |
17:33:19 | * | Snircle joined #nim |
18:04:32 | * | skellock quit (Quit: WeeChat 2.3) |
18:08:55 | * | FromGitter joined #nim |
18:29:33 | * | wildlander joined #nim |
18:37:52 | * | wildlander is now known as wildlander_ |
18:38:14 | * | wildlander_ is now known as wildlander |
18:49:45 | * | PMunch quit (Remote host closed the connection) |
19:07:58 | * | qwertfisch is now known as qwertesser |
19:14:36 | FromGitter | <zacharycarter> just be like me and be in #nim on irc, gitter and discord |
19:14:46 | FromGitter | <zacharycarter> should probably add riot / matrix in too |
19:15:17 | * | zacharycarter joined #nim |
19:20:02 | * | zachk joined #nim |
19:20:31 | * | zachk quit (Changing host) |
19:20:31 | * | zachk joined #nim |
19:21:30 | shashlick | can you write to a file at CT |
19:23:10 | FromGitter | <zacharycarter> oh wow - bridge is working again apparently |
19:23:11 | FromGitter | <zacharycarter> nice! |
19:23:36 | Zevv | shashlick: yes, you can |
19:23:39 | Zevv | writeFile() |
19:25:13 | shashlick | no wonder its been so quiet |
19:27:56 | * | nsf quit (Quit: WeeChat 2.3) |
19:35:56 | * | kapil____ quit (Quit: Connection closed for inactivity) |
19:42:07 | shashlick | thanks by the way Zevv |
19:45:45 | Zevv | What is the cause of "Error: cannot evaluate 'sizeof' because its type is not defined completely"? |
19:47:26 | * | dom96_w joined #nim |
19:50:32 | * | skellock joined #nim |
19:53:58 | FromGitter | <mratsim> importc |
20:03:08 | * | absolutejam joined #nim |
20:05:04 | shashlick | how do I import a module only at compile time and not at runtime |
20:07:07 | FromDiscord_ | <demotomohiro> is it possible to use importc to import types in c |
20:07:18 | FromDiscord_ | <demotomohiro> or cpp? |
20:11:00 | FromDiscord_ | <demotomohiro> "import" is not something executed at runtime. But it seems nim call module initialize code even if you use procs in the module only at compile time. |
20:11:44 | Araq | not on devel anymore. it's been optimized. |
20:32:22 | * | Perkol joined #nim |
20:39:02 | shashlick | demotomohiro: that's what I'm working on with nimterop |
20:46:40 | * | Perkol quit (Remote host closed the connection) |
20:46:41 | shashlick | Araq: so is it possible to check for compile time - when definedX: import xyz, where definedX is compile time or not? |
20:51:24 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:56:37 | zacharycarter | shashlick: it used to be possible, unless something changed |
20:58:22 | shashlick | I was trying to use https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-compile-time-define-pragmas |
20:59:02 | shashlick | but an intdefine is not propagated to other files |
21:00:15 | shashlick | really wish we had that {.define.} pragma |
21:03:55 | FromGitter | <kaushalmodi> Araq: one test is failing on Nim nightlies for 32-bit Windows: https://travis-ci.org/nim-lang/nightlies/jobs/479722733#L809 |
21:05:00 | FromDiscord_ | <Protty> when you do `--os:standalone` is the whole system's module excluded or only sections of it? |
21:08:59 | Araq | intdefine is used by the stdlib and it works |
21:09:44 | FromDiscord_ | <Protty> so it only includes numbers & define? |
21:09:45 | Araq | kaushalmodi: ok, GULPF will take a look |
21:10:07 | FromGitter | <kaushalmodi> ok, I'll open an issue |
21:10:17 | Araq | shashlick: const foobar {.intdefine.} = defaultvalue works as documented |
21:10:35 | shashlick | Araq: well i'm trying to use it in a different way - declaring it in the mainmodule and hoping it shows up in imported modules in a when defined() |
21:10:47 | shashlick | not specifying anyting in the command line |
21:11:00 | shashlick | it doesn't propagate |
21:11:03 | Araq | er use 'declared' instead? |
21:11:13 | shashlick | ah |
21:11:13 | Araq | a const is never a --define |
21:12:48 | shashlick | no luck |
21:13:10 | shashlick | so i'm declaring a const in my main module and anything this module imports should see this |
21:13:15 | shashlick | obviously exporting the const doesn't help |
21:13:23 | shashlick | since the main module isn't being imported |
21:14:15 | shashlick | long story short, i want to be able to import packages on a condition |
21:24:47 | Araq | well it's a module system, import some module.nim in all the other modules that care about it |
21:25:35 | Araq | and in module.nim you can have a const .intdefine. That wasn't so hard now, was it... |
21:29:34 | shashlick | that will work for scenario 1 where i want const to have value 1 which means import packageX |
21:30:00 | shashlick | but scenario 2 where I don't want to import packageX, i have to set the const to something else - only way is to use command line or a nims file |
21:31:56 | shashlick | anyway, all just to avoid creating an extra file |
21:32:07 | shashlick | but you really need to reinstate {.define.} 🙂 |
21:32:27 | Araq | I don't understand. const useBlas {.intdefine.} = 0 |
21:32:32 | Araq | # clients: |
21:32:41 | Araq | when useBlas == 1: import blas |
21:33:02 | Araq | we're lacking a .booldefine, but ints are ok |
21:34:16 | * | thomasross joined #nim |
21:35:56 | shashlick | ok will try that |
21:46:43 | * | zacharycarter quit (Ping timeout: 256 seconds) |
21:58:24 | * | dom96_w joined #nim |
21:58:31 | * | dom96_w quit (Client Quit) |
22:03:00 | * | dom96_w joined #nim |
22:17:09 | * | Vladar quit (Remote host closed the connection) |
22:18:52 | * | enow quit (Quit: leaving) |
22:20:26 | * | dddddd quit (Ping timeout: 246 seconds) |
22:20:43 | * | dom96_w quit (Quit: Textual IRC Client: www.textualapp.com) |
22:36:07 | * | zachcarter joined #nim |
22:39:59 | * | dddddd joined #nim |
22:55:55 | * | vlad1777d quit (Ping timeout: 246 seconds) |
22:57:51 | FromGitter | <kaushalmodi> shashlick: you here? |
23:05:26 | * | skellock quit (Ping timeout: 272 seconds) |
23:13:17 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:14:49 | * | krux02 quit (Remote host closed the connection) |
23:23:02 | FromDiscord_ | <exelotl> is there a way to make a proc use different implementations at compile time vs at runtime? |
23:23:20 | FromGitter | <timotheecour> when nimvm |
23:23:36 | FromDiscord_ | <exelotl> ah thanks, that'll be it |
23:24:56 | FromGitter | <zacharycarter> forgive me if I'm way off - but are users being encouraged now to use `-opt:size|speed` rather than `-d:release` ? |
23:25:51 | FromGitter | <timotheecour> ya docs arent’ clear on what does -d:release imply; is that size or speed; shd be clarified in a PR instead of just answering here |
23:26:32 | FromGitter | <timotheecour> ```@if release: ⏎ opt:speed ⏎ @end``` ⏎ ⏎ so gives ur answer, but shd be clarified in docs [https://gitter.im/nim-lang/Nim?at=5c3fbda81cb70a372aede9cf] |
23:28:19 | FromGitter | <timotheecour> (and `nim —dump` shd tell u what r options actually computed so we avoid docs becoming out of sync w code) |
23:33:04 | * | lritter joined #nim |
23:37:39 | rayman22201 | I'm really curious about the answer to this question. Any ideas? https://forum.nim-lang.org/t/4566 |
23:38:04 | rayman22201 | I thought it was a simple typo or something, but I don't see anything. |
23:40:39 | * | skellock joined #nim |
23:42:43 | shashlick | Hey @kaushalmodi |
23:45:04 | * | skellock quit (Ping timeout: 258 seconds) |
23:45:12 | FromGitter | <kaushalmodi> Hello |
23:45:23 | FromGitter | <kaushalmodi> On mobile now though |
23:46:19 | * | ryukoposting quit (Remote host closed the connection) |
23:46:36 | * | leorize quit (Ping timeout: 252 seconds) |
23:47:22 | FromGitter | <kaushalmodi> I had pinged you about that getCurrentException, but you already responded to that. Thanks :) |
23:48:24 | * | darithorn joined #nim |
23:51:28 | FromGitter | <zacharycarter> thanks @timotheecour |
23:51:40 | * | darithorn quit (Client Quit) |
23:51:54 | FromGitter | <timotheecour> np |
23:56:27 | rayman22201 | @timotheecour how about this: https://gist.github.com/rayman22201/92f28f0c1d9ccbc5a36fe04c2132c49e |