00:05:49 | * | MJCaley quit (Quit: MJCaley) |
00:09:23 | * | ipjk_ joined #nim |
00:09:24 | * | cornfeedhobo quit (Quit: ZNC - http://znc.in) |
00:12:23 | * | cornfeedhobo joined #nim |
00:12:34 | * | ipjk quit (Ping timeout: 260 seconds) |
00:20:37 | * | MJCaley joined #nim |
00:22:32 | * | freddy92 quit (Quit: Client Disconnecting) |
00:34:00 | * | wolf135 quit (Read error: Connection reset by peer) |
00:39:09 | * | yglukhov quit (Remote host closed the connection) |
00:39:46 | * | yglukhov joined #nim |
00:43:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:04:25 | * | metaden joined #nim |
01:35:16 | * | metaden quit (Quit: Page closed) |
01:48:01 | FromGitter | <gogolxdong> I delivered the 0.18.0 release news to open source china at the first moment as 2 hours after published on Hacker news. Seems few people know it and the ones who know it are likely geek. |
01:53:10 | * | dddddd quit (Ping timeout: 240 seconds) |
01:56:31 | * | dddddd joined #nim |
02:05:04 | FromGitter | <2vg> Is there a good coroutine library for Nim? ⏎ ⏎ For example, like Rust's May (https://github.com/Xudong-Huang/may) |
02:11:19 | * | S1tiSchu joined #nim |
02:15:17 | * | SitiSchu quit (Ping timeout: 268 seconds) |
02:33:31 | * | vlad1777d quit (Ping timeout: 245 seconds) |
02:36:32 | ipjk_ | mratsim: Keep on doing great work on arraymancer. Despite it's young age, it's up with the big dogs. So just keep on working. |
02:53:09 | * | endragor joined #nim |
03:16:14 | * | ipjk_ quit (Quit: Leaving) |
03:26:07 | FromGitter | <zetashift> @gogolxdong, that sounds *awesome* are the docs for them enough? |
03:26:57 | * | Pisuke quit (Ping timeout: 240 seconds) |
03:43:25 | * | yglukhov joined #nim |
03:47:45 | * | yglukhov quit (Ping timeout: 248 seconds) |
03:48:30 | * | sz0 joined #nim |
03:51:18 | * | gangstacat quit (Quit: Ĝis!) |
03:51:45 | * | gangstacat joined #nim |
04:10:09 | * | xet7 quit (Ping timeout: 252 seconds) |
04:12:37 | FromGitter | <gogolxdong> Everything from west world won't be popular in China until it finished its localization, due to more people have difficulties in English. |
04:16:40 | FromGitter | <gogolxdong> It's about the ecosystem constituted of documents and community localized. |
04:21:36 | FromGitter | <gogolxdong> They are smart and hardworking enough to push anything to the top of the world. |
04:51:22 | * | MJCaley quit (Quit: MJCaley) |
05:03:44 | * | xet7 joined #nim |
05:53:47 | * | SenasOzys_ joined #nim |
05:53:55 | * | SenasOzys quit (Remote host closed the connection) |
05:56:47 | * | SenasOzys_ quit (Remote host closed the connection) |
05:58:00 | * | SenasOzys_ joined #nim |
05:58:31 | * | SenasOzys_ quit (Remote host closed the connection) |
06:04:43 | * | xkapastel quit (Quit: Connection closed for inactivity) |
06:35:52 | * | nsf joined #nim |
06:49:55 | * | miran joined #nim |
06:58:47 | * | dddddd quit (Remote host closed the connection) |
07:04:44 | * | endragor quit (Remote host closed the connection) |
07:06:44 | * | sz0 quit (Quit: Connection closed for inactivity) |
07:36:11 | * | xkapastel joined #nim |
07:36:38 | * | nsf quit (Quit: WeeChat 2.0.1) |
07:37:33 | * | nsf joined #nim |
07:39:52 | * | r3d9u11 joined #nim |
07:55:25 | * | arnetheduck quit (Remote host closed the connection) |
07:56:07 | * | arnetheduck joined #nim |
07:56:37 | * | arnetheduck quit (Remote host closed the connection) |
07:56:59 | * | arnetheduck joined #nim |
07:57:41 | * | arnetheduck quit (Remote host closed the connection) |
07:58:18 | * | arnetheduck joined #nim |
08:24:11 | * | r3d9u11 quit (Read error: Connection reset by peer) |
08:24:31 | * | r3d9u11 joined #nim |
08:40:22 | * | BitPuffin joined #nim |
08:53:44 | FromGitter | <mratsim> @ipjk_, thanks :) |
08:54:53 | FromGitter | <mratsim> @momf I suppose you checked: https://nim-lang.org/docs/coro.html but it seems pretty dry. I would love a `yield from`like in Python |
08:55:41 | FromGitter | <mratsim> There is this fiber PoC as well: https://github.com/mogud/nimfiber |
08:55:51 | FromGitter | <mratsim> @2vg* |
08:58:56 | * | yglukhov joined #nim |
09:01:29 | miran | hey mratsim! i had to go to sleep yesterday, but this morning i have checked what has been written here and on github |
09:06:52 | miran | now i'm experimenting with creating a 2d array and converting it to Tensor, to see if that's quicker, but i've been getting SIGSEGV |
09:10:28 | miran | ah, it seems it's because the wanted dimensions are too big for nim's array to handle!? |
09:27:42 | FromGitter | <2vg> wow, want to develop this |
09:28:30 | FromGitter | <2vg> Rust's May seem faster than tokio-minihttp. |
09:39:58 | FromGitter | <mratsim> @miran Array are on the stack which is limited to a few MB, you probably want to use a ref array or a seq |
09:41:07 | * | yglukhov quit (Remote host closed the connection) |
09:41:43 | * | yglukhov joined #nim |
09:43:25 | Yardanico | @2vg is your benchmarking code you've used for comparasion with tokio-minihttp is available somewhere? |
09:43:27 | Yardanico | I didn't find it |
09:44:20 | miran | @mratsim: if i use seqs, i back on the newSeqWith problem, no? |
09:44:37 | FromGitter | <mratsim> If you want to now more about that, check stack and heap. High level language usually only use the heap. The big advantage of the stack is speed and automatic memory management, you don’t need a GC/reference counting/memory reclamation scheme to manage the stack, the OS does it at function exit |
09:45:10 | FromGitter | <mratsim> you can use the `fill` proc in the `algorithm` module to fill your seq with 1 |
09:45:20 | FromGitter | <mratsim> or use a for loop ;) |
09:45:38 | miran | any point of using seq of arrays? |
09:46:18 | FromGitter | <mratsim> yes, less indirections, seq of seq or seq of ref arrays would require dereferencing 2 pointers, seq of arrays only one |
09:47:09 | FromGitter | <mratsim> btw do you have the Python benchmark? I’ll add it to the open issue |
09:47:32 | miran | yeah, i'll post it there |
09:47:39 | * | dylan joined #nim |
09:50:22 | miran | posted. try running it to compare both speed and memory consumption (for me is twice as good in both compartments) |
09:51:07 | miran | has your new commit improved the initialization? if so, by how much? |
09:51:14 | * | rokups joined #nim |
09:52:03 | FromGitter | <mratsim> 33% on my machine |
09:52:11 | FromGitter | <mratsim> sorry 3x |
09:52:36 | FromGitter | <mratsim> I just used a for loop instead of newSeqWith |
09:53:18 | miran | niiiceee!! |
09:54:42 | miran | i don't have much experience with nimble - how do i switch to AM devel version? do i first uninstall the stable one? |
09:56:22 | FromGitter | <mratsim> nimble install https://github.com/mratsim/Arraymancer@#head |
09:56:39 | FromGitter | <mratsim> or maybe just arraymancer@#head would work |
09:57:46 | miran | no need to uninstall current version? |
10:01:13 | FromGitter | <mratsim> no |
10:01:36 | * | rauss quit (Read error: Connection reset by peer) |
10:04:06 | FromGitter | <2vg> @Yardanico That code does not exist now. However, it can easily be reproduced. |
10:04:10 | * | rauss joined #nim |
10:09:05 | miran | @mratsim: from 13-14 seconds to 6-7 seconds! very nice!! |
10:09:27 | FromGitter | <mratsim> so now it’s faster than Python? |
10:10:23 | FromGitter | <2vg> for example, such code https://ghostbin.com/paste/brb7m |
10:10:59 | miran | let me check |
10:11:12 | FromGitter | <2vg> @Yardanico * |
10:14:17 | Yardanico | @2vg thanks |
10:15:19 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:15:48 | miran | @mratsim: python is around 6 sec, so basically now they have the same speed (AM still uses 2x memory than python) |
10:16:19 | FromGitter | <mratsim> okay. I’m working on further improvements |
10:16:30 | FromGitter | <mratsim> not sure how long it would take though |
10:22:58 | miran | no problem, thank you for dealing with this already! much appreciated! |
10:30:17 | miran | for completeness sake: when i change the problem and have much more timesteps/iterations, nim/AM (expectedly) becomes faster than python |
10:31:44 | miran | for that problem, which before took 46 seconds, with new AM the timing is 40 seconds - it seems that new way of creating arrays shaves constant 6 seconds |
10:32:27 | miran | (in the example before, it was drop from 13-14 seconds to 7 sec) |
10:32:30 | FromGitter | <mratsim> thank you |
10:33:01 | FromGitter | <mratsim> I have a huge intuition that my template usage was duplicating code |
10:33:51 | FromGitter | <mratsim> if I do `template foo(x: Tensor) =` and x is the result of a function, everytime x is used in the template it will call that function. |
10:42:21 | * | xet7 quit (Ping timeout: 265 seconds) |
10:47:52 | * | vlad1777d joined #nim |
10:56:01 | * | miran quit (Ping timeout: 245 seconds) |
11:02:20 | * | SenasOzys joined #nim |
11:03:29 | * | SenasOzys quit (Remote host closed the connection) |
11:03:51 | * | SenasOzys joined #nim |
11:04:26 | FromGitter | <krux02> @mratsim: yes |
11:07:42 | FromGitter | <krux02> @mratsim : http://ix.io/SiM/nim |
11:07:58 | FromGitter | <krux02> http://ix.io without highlighting |
11:08:19 | FromGitter | <krux02> sorry I mean this: http://ix.io/SiM |
11:11:34 | * | r3d9u11 quit (Remote host closed the connection) |
11:15:06 | FromGitter | <mratsim> Thanks, fixing that |
11:29:05 | * | xkapastel joined #nim |
11:40:07 | FromGitter | <mratsim> I’m not sure how to solve that when the template requires a var parameter like `template foo(t: var Tensor, op: untyped) = ` |
11:42:02 | FromGitter | <mratsim> Maybe use a no-op proc |
11:54:07 | FromGitter | <krux02> @mratsim can you give me a bit more context? |
11:54:54 | FromGitter | <krux02> what you always can do is use pointers. |
11:55:47 | * | solitudesf joined #nim |
12:01:56 | FromGitter | <krux02> @mratsim http://ix.io/SjR/nim |
12:02:33 | * | Snircle joined #nim |
12:03:04 | FromGitter | <krux02> if getInt would be evaluated each time, the inceraes would not work |
12:09:24 | FromGitter | <dom96> Araq: just found this: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html |
12:11:29 | * | el_tejon joined #nim |
12:18:59 | FromGitter | <krux02> I thought about it as well and Araq brought enums into the field. |
12:19:49 | FromGitter | <krux02> But enums are Nominal, meaning they should not have a `<` relation. It is just that our representation as integers allows them to have a `<` relation, but they are not integers |
12:25:30 | FromGitter | <krux02> @dom96: I just read the article and I have to say it, I don't get he point. |
12:34:33 | * | r3d9u11 joined #nim |
12:34:57 | * | rauss quit (Read error: Connection reset by peer) |
12:46:23 | * | natrys joined #nim |
12:58:23 | * | solitudesf quit (Quit: solitudesf) |
13:00:29 | * | solitudesf joined #nim |
13:06:25 | * | solitudesf quit (Quit: solitudesf) |
13:08:17 | * | yglukhov quit (Ping timeout: 248 seconds) |
13:09:13 | * | solitudesf joined #nim |
13:12:06 | FromGitter | <tim-st> What is the correct way to to have this code working at compile time (I want this bool to be set at compile time by the user): |
13:12:07 | FromGitter | <tim-st> proc test*(flag=false): int = ⏎ when flag: result = 20 ⏎ else: result = 21 |
13:12:25 | FromGitter | <tim-st> I tried with template but had no luck |
13:13:10 | * | jaco60 joined #nim |
13:17:49 | FromGitter | <Jaco60_twitter> Hi, what’s the best naming scheme for project config file : myApp.nim.cfg or myApp.nims ? I’ve seen both. |
13:20:48 | FromGitter | <nitely> @tim-st I think `template test*(result: var int, flag=false) = ...` |
13:21:37 | FromGitter | <nitely> there is no result var in templates as in procs iirc |
13:22:50 | FromGitter | <tim-st> @nitely Thanks, I'll try. Is it possible to allow a proc to have params that need to be set constant at compile time? |
13:23:43 | FromGitter | <tim-st> so that I can't pass `var b = false` only `const b = false` ? |
13:25:15 | FromGitter | <tim-st> it seems `flag: static[bool]` does the trick |
13:26:17 | FromGitter | <tim-st> no, only one example is fixed with this... |
13:27:35 | FromGitter | <tim-st> No, both are fixed. But there is a bug: `static[bool]=false` doesnt work, so static types cant have default values while this should be allowed |
13:28:07 | FromGitter | <tim-st> now, I always have to type `call(var, false)` |
13:30:19 | FromGitter | <nitely> the template should work |
13:30:47 | FromGitter | <nitely> if you use `when` then that param must be provided at compile time (const) |
13:36:24 | FromGitter | <nitely> if you dislike passing the result as a var, then you can do `template test*(flag=false): int = when flag: 10 else: 20` |
13:36:33 | FromGitter | <nitely> not sure if that's idiomatic though |
13:38:03 | FromGitter | <nitely> maybe someone can provide a better way |
13:40:33 | planetis[m] | dom96: it makes a good point that the difference is always the interval lenght. the other points seem subjective |
13:44:02 | FromGitter | <tim-st> @nitely Thanks for the answer! |
13:45:54 | FromGitter | <tim-st> I see the bug is known: https://github.com/nim-lang/Nim/issues/6928 |
13:46:31 | FromGitter | <data-man> https://github.com/nim-lang/Nim/pull/7282 Please, more opinions. Before it's too late. :-) |
13:48:11 | * | SenasOzys quit (Ping timeout: 276 seconds) |
13:51:47 | FromGitter | <nitely> @tim-st well, you can always use proc overloading to workaround that bug |
13:52:45 | FromGitter | <nitely> `proc test*(): int = test(false)` |
13:53:21 | FromGitter | <tim-st> Of course, I forgot that, thank you very much! |
13:54:23 | FromGitter | <data-man> @nitely: Can you add Unicode 11.0 to nim-unicodedb, please? |
13:54:40 | FromGitter | <zetashift> Why do I have to create a ref object of TNode: https://play.nim-lang.org/?gist=2eeddda5f9b9bddacbf05ffc1d050d1d (code was taken from Rosettacode) |
13:54:48 | FromGitter | <nitely> @data-man is that out? |
13:54:51 | FromGitter | <zetashift> type is supposed to represent a tree |
13:55:06 | FromGitter | <data-man> @nitely: No, beta. |
13:55:59 | FromGitter | <data-man> Emoji 11.0 is out. |
13:56:08 | FromGitter | <nitely> I would rather not, then |
13:56:38 | FromGitter | <nitely> so, you need support for the emojis? |
13:57:36 | FromGitter | <data-man> Yes! |
13:57:56 | * | SenasOzys joined #nim |
13:59:28 | FromGitter | <nitely> XD, ok, I'll update it |
13:59:41 | FromGitter | <data-man> I have an idea: to add the Unicode version for downloading for your gen-scripts. |
14:00:56 | FromGitter | <nitely> that would be nice. But I don't think it will always work without code changes |
14:01:37 | FromGitter | <nitely> I think unicode 11 does not add anything new other than code points to the db, so it should work this time |
14:03:12 | FromGitter | <nitely> in theory you can just update the txt files in the gen folder and then run the gen script and it should just work |
14:04:31 | * | dddddd joined #nim |
14:04:57 | FromGitter | <data-man> Yes, but the suffixes of the files sometimes changed (*-11.0.0d1.txt) :-) |
14:06:03 | FromGitter | <nitely> ah, did not know that |
14:07:29 | FromGitter | <data-man> In versions 9-10-beta was the same. |
14:08:16 | * | NimBot joined #nim |
14:08:33 | * | xkapastel quit (Quit: Connection closed for inactivity) |
14:09:18 | FromGitter | <data-man> https://www.unicode.org/Public/11.0.0/ucd/ |
14:09:42 | FromGitter | <data-man> https://www.unicode.org/Public/emoji/11.0/ |
14:11:53 | FromGitter | <nitely> @data-man are you using unicodedb? |
14:12:09 | FromGitter | <data-man> Yes |
14:12:23 | FromGitter | <nitely> :O awesome |
14:12:25 | FromGitter | <data-man> It's great, thanks! |
14:13:12 | FromGitter | <nitely> you are welcome :) |
14:13:30 | FromGitter | <nitely> I'm happy someone actually uses it XD |
14:15:19 | FromGitter | <data-man> But I'm thinking about reducing the DB-size. I like how it's made in D. |
14:16:26 | FromGitter | <nitely> how? |
14:21:24 | FromGitter | <data-man> With tries and intervals |
14:21:29 | FromGitter | <data-man> https://github.com/dlang/phobos/blob/master/std/internal/unicode_tables.d |
14:22:51 | FromGitter | <data-man> Also D's std.uni has CodepointSet |
14:27:26 | FromGitter | <data-man> Another idea: macro isAlpha, isDigit, etc. which will generate the code during compiletime. |
14:31:16 | * | leorize quit (Quit: WeeChat 2.0.1) |
14:32:52 | FromGitter | <data-man> D's std.uni has good toSourceCode func: https://github.com/dlang/phobos/blob/master/std/uni.d#L2762 |
14:41:57 | FromGitter | <nitely> I'm reading https://dlang.org/phobos/std_uni.html "Construction of lookup tables " section and the source code... |
14:42:06 | FromGitter | <nitely> they do the same as I did... |
14:42:23 | FromGitter | <nitely> multi-stage tables (a kind of trie) |
14:42:38 | * | el_tejon quit (Quit: el_tejon) |
14:43:34 | FromGitter | <nitely> it would be interesting to try interval tries and check the log(n) access vs size savings is worth it... |
14:44:36 | FromGitter | <nitely> I guess it would in CPUs with a small cache, maybe.. |
14:45:53 | FromGitter | <data-man> How about https://github.com/JuliaLang/utf8proc ? ⏎ I think that it's more compact, but probably is slowly. |
14:48:04 | FromGitter | <data-man> See https://github.com/JuliaLang/utf8proc/blob/master/utf8proc.h#L236 |
14:50:45 | * | xet7 joined #nim |
14:51:03 | * | PMunch joined #nim |
14:51:25 | FromGitter | <nitely> nah, the data is here: https://raw.githubusercontent.com/JuliaLang/utf8proc/master/utf8proc_data.c |
14:53:10 | FromGitter | <data-man> I know, I showed the data structure. :-) |
14:53:13 | * | el_tejon joined #nim |
14:53:13 | FromGitter | <nitely> I can generate the data in multi column to make it look more compact :P |
14:54:05 | FromGitter | <data-man> It would be great! |
14:55:26 | FromGitter | <nitely> but it would take the same amount of memory XD |
14:57:16 | FromGitter | <data-man> It doesn't matter. Look matters. :-) |
14:59:19 | FromGitter | <nitely> they use multiple ints to store lowercase, cased, etc properties |
14:59:30 | FromGitter | <nitely> I use a single integer... |
15:00:21 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:00:34 | FromGitter | <nitely> I doubt they care a lot about optimizations |
15:01:55 | FromGitter | <nitely> but also, nim has "dead code elimination" so I can separate lookup tables better |
15:02:33 | FromGitter | <data-man> If you're interested, there's a good Unicode unit for Pascal: https://github.com/BeRo1985/pucu |
15:02:52 | * | miran joined #nim |
15:03:06 | * | ninigga joined #nim |
15:05:24 | ninigga | Hello, is this result expected? https://play.nim-lang.org/?gist=2801bdff1f0d96ae1fa65b447ecf0314 |
15:06:28 | FromGitter | <data-man> @ninigga: Yes |
15:08:04 | FromGitter | <nitely> I wish all programmers would put a description of the algorithms they used, so I don't have to decipher the source code |
15:09:21 | miran | ninigga: if you want to iterate from a larger to a smaller value, you need to use `countdown` |
15:09:24 | FromGitter | <data-man> @ninigga ⏎ ⏎ ```echo("b4") ⏎ for item in countdown(10, 1): ⏎ echo("Hello") ⏎ echo("after")``` [https://gitter.im/nim-lang/Nim?at=5a9c0c23e4ff28713af19248] |
15:10:14 | ninigga | it just looks like a bug, it should probably throw a compilation error |
15:11:08 | FromGitter | <nitely> @data-man that pascal code generates hash tables only AFAICT |
15:11:13 | FromGitter | <data-man> @nitely: https://github.com/BeRo1985/flre A fast light regular expression library for Pascal :-) |
15:11:26 | miran | ninigga: i would rather see `..` work in both cases (low to high, and high to low), but unfortunately this is not happening.... |
15:13:32 | FromGitter | <data-man> @nitely: https://github.com/BeRo1985/pucu/blob/master/src/PUCUCode.pas |
15:14:01 | FromGitter | <nitely> miran: I would too, but lately I have been relaying on "invalid ranges" too much :P |
15:14:45 | FromGitter | <nitely> I like how they just don' enter the loop |
15:16:29 | miran | i guess it is a matter of getting used do a behaviour |
15:16:39 | miran | *to |
15:21:16 | * | yglukhov joined #nim |
15:28:07 | FromGitter | <nitely> @data-man ah that code seems to use multi-stage tables |
15:30:01 | FromGitter | <nitely> the regex library seems neat, I'll take a look at the many optimizations it has |
15:30:58 | FromGitter | <nitely> nim-regex has a NFA engine, so it's not that fast, but at least i has consistent performance... |
15:31:38 | * | rauss joined #nim |
15:32:41 | planetis[m] | ninigga: https://nim-lang.org/docs/tut1.html#control-flow-statements-for-statement its there if you like to read docs |
15:33:16 | FromGitter | <nitely> @data-man all DFAs generated "in the fly" have unpredictable performance, which tends to get slower than a NFA in the worst case |
15:33:48 | FromGitter | <nitely> but nim-regex will generate a static DFA one day, then it will be way faster |
15:37:39 | jaco60 | In HttpClient module help page (https://nim-lang.org/docs/httpclient.html), a lot of deprecated warnings ask to use the deprecated proc... (Deprecated since version 0.15.0: use HttpClient.request for the request() proc, for example). Is it a typo/bug/relic or is there something i don't understand in the doc? |
15:39:26 | FromGitter | <mratsim> @krux02 Here is the template example: https://github.com/mratsim/Arraymancer/blob/cffa052a44d95cf231e1a2100dd9d5bf9bb9b36e/src/tensor/higher_order_applymap.nim#L24 ⏎ ⏎ It can be use for result of slices like this `apply_inline(t[0..1, 0..1], x * 2)` to double part of the slice |
15:40:39 | FromGitter | <dom96> Jaco60: look at the examples at the top of the module docs |
15:41:03 | FromGitter | <dom96> https://nim-lang.org/docs/httpclient.html#retrieving-a-website |
15:42:05 | jaco60 | @dom96: i understand how the proc work... I don't understand why they are flagged deprecated |
15:51:52 | ninigga | guys, how does one get the character length of a string that uses non-ascii? |
15:55:24 | Yardanico | ninigga, use unicode module :) |
15:55:39 | Yardanico | https://nim-lang.org/docs/unicode.html#runeLen,string |
15:56:10 | ninigga | yeah, thansk |
15:56:14 | Yardanico | @nitely - I suppose nim-regex will support unicode in the future? or it already does that? |
15:56:20 | Yardanico | oh, I see, it does! cool |
15:58:29 | FromGitter | <nitely> Yardanico: actually, I've to add support for raw bytes XD |
15:59:42 | FromGitter | <nitely> AKA ascii. It can't be used to match data in some binary file, I think... |
16:00:16 | FromGitter | <nitely> it's only good for text |
16:00:20 | Yardanico | @nitely - I can use nim-regex at runtime, right? I mean match to regexes which are only known at runtime |
16:01:52 | FromGitter | <nitely> yes, you can match at runtime |
16:02:08 | FromGitter | <nitely> you can't match at compile time because of nim bugs |
16:02:28 | Yardanico | Ok, thanks to your answers! your library looks very cool |
16:02:37 | FromGitter | <nitely> all yo can do at compile time is compiling the regex expression |
16:02:54 | FromGitter | <nitely> no problem |
16:03:11 | FromGitter | <dom96> Jaco60: they aren't deprecated. You're using the wrong ones. Copy the code there and you will see that you don't get deprecation warnings. |
16:05:40 | FromGitter | <nitely> Yardanico: ah, I misread that. You can compile expressions at runtime. Just use `let pattern = toPattern(r"regex")` |
16:06:11 | jaco60 | @dom96: it seems you don't understand what i mean (sorry for my bad english) :) It hurts me to read in a doc "deprecated, use Foo instead" just under the description of the Foo proc.... (Foo being request(), get(), post(), etc. |
16:07:04 | FromGitter | <nitely> mmh, but you'll also need to escape that regex if you get it from some file... that escaping function is not implemented yet, but you can use the one in the `re` module |
16:09:00 | miran | jaco60: what do you propose? to remove deprecated procs from docs? |
16:12:17 | jaco60 | @miran: no, of course... But perhaps being more precise... If i discover a proc named "blah" in a doc, it seems curious to read "deprecated, use blah instead"... I understand this is a matter of overloading, but i found this rather disturbing... |
16:23:05 | * | nc-x joined #nim |
16:24:37 | FromGitter | <dom96> Jaco60: okay sure. We can improve the docs, but I'm not really sure how. I suppose linking to the replacement proc would help? |
16:25:50 | * | MJCaley joined #nim |
16:26:59 | FromGitter | <Jaco60_twitter> @dom96: if the deprecated proc is to be replaced by a proc of same name, a link would help for a html version, yes. |
16:30:04 | * | nc-x quit (Ping timeout: 260 seconds) |
16:36:35 | FromGitter | <data-man> @nitely: For Delphi I used SkRegExp: http://skregexp.komish.com/download/ There is the slightly outdated repo: https://github.com/shukomiya/skregexp ⏎ I like the library's design: no regex's VM, each regex's subpattern is processed by the appropriate object. And it's worked very fast. |
16:46:33 | * | ninigga quit (Quit: Leaving) |
16:48:10 | FromGitter | <mratsim> @dom96 there might be some false warnings on deprecated proc with the same name as the replacement proc, I noticed that for typedesc but there might be other cases: https://github.com/nim-lang/Nim/issues/6436 |
16:51:55 | FromGitter | <nitely> @data-man that sounds like what https://github.com/Araq/lexim does, it has a macro that generates the code for matching a given pattern. That can only be done with a static DFA |
16:53:03 | * | MJCaley quit (Quit: MJCaley) |
17:03:50 | FromGitter | <mratsim> Maybe we can ask the Haskell people to do a Nim parser? /p https://www.reddit.com/r/haskell/comments/81vrbk/ann_languagerust/ |
17:22:17 | * | dylan is now known as dylan42069666 |
17:23:03 | Yardanico | @mratsim: he said he already has next project |
17:23:05 | Yardanico | inline-rust |
17:24:31 | * | dylan42069666 is now known as dylan |
17:24:48 | * | dylan is now known as dylan42069666 |
17:28:15 | * | dylan42069666 is now known as dolan |
17:28:45 | * | dolan is now known as Guest18796 |
17:31:16 | * | xkapastel joined #nim |
17:31:19 | Araq | dom96, that Dijkstra article is well known. it's also wrong for the reasons I've mentioned two or three hundred times here. |
17:34:12 | Araq | but just for you, here it is again. Excluding bounds do only work when you have a sentinel you don't want to iterate over. That is often NOT the case and even in C with its non-existing enums it leads to problems such as "&a[N] is a valid address but it is invalid to deref the address" |
17:35:03 | * | Guest18796 quit (Remote host closed the connection) |
17:36:29 | * | dylan joined #nim |
17:36:34 | * | xet7 quit (Ping timeout: 265 seconds) |
17:36:42 | * | dylan quit (Read error: Connection reset by peer) |
17:38:52 | * | el_tejon quit (Quit: el_tejon) |
17:40:07 | * | el_tejon joined #nim |
17:46:38 | federico3 | is there a tool/lib to generate parsers from ABNF? |
17:50:26 | * | dylan joined #nim |
17:57:08 | * | dylan quit (Read error: Connection reset by peer) |
17:58:11 | * | dylan joined #nim |
18:00:52 | * | dylan quit (Read error: Connection reset by peer) |
18:07:01 | * | SenasOzys quit (Ping timeout: 265 seconds) |
18:07:31 | * | dylan joined #nim |
18:12:34 | * | MJCaley joined #nim |
18:14:05 | * | dylan quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
18:14:30 | * | dylan joined #nim |
18:17:55 | * | SenasOzys joined #nim |
18:20:17 | * | dylan is now known as dtg |
18:20:19 | * | dtg is now known as dtg42 |
18:20:21 | * | dtg42 is now known as dylang |
18:20:28 | * | dylang is now known as dylan |
18:28:28 | * | dylan is now known as dylgal |
18:29:36 | * | el_tejon quit (Quit: el_tejon) |
18:29:38 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
18:29:48 | * | dylgal is now known as dylang |
18:31:45 | * | el_tejon joined #nim |
18:38:13 | * | natrys quit (Ping timeout: 240 seconds) |
18:38:39 | * | jxv joined #nim |
18:46:56 | * | shack joined #nim |
18:47:07 | * | shack left #nim ("WeeChat 2.0.1") |
18:51:47 | * | natrys joined #nim |
18:51:54 | GitDisc | <Lite5h4dow> Is the guy that made the bindings for NimNuklear here? |
18:52:13 | FromGitter | <zacharycarter> yes |
18:52:20 | GitDisc | <Lite5h4dow> 😮 |
18:52:38 | * | r3d9u11 quit (Remote host closed the connection) |
18:52:47 | GitDisc | <Lite5h4dow> Sir, i love that youve made the bindings available, but i dont know C, so i have no clue how to use it |
18:53:14 | GitDisc | <Lite5h4dow> do you know where i can look for some documentation? |
18:54:09 | FromGitter | <zacharycarter> most of the docs are in the nuklear header themselves :/ there |
18:54:24 | FromGitter | <zacharycarter> https://github.com/zacharycarter/nuklear-nim/blob/master/examples/nuklear_nim_examples/glfw3_opengl3.nim - is an example using GLFW3 as the windoing lib and OpenGL3 as the rendering backend |
18:55:43 | GitDisc | <Lite5h4dow> i have no idea whats going on though xD |
18:56:05 | GitDisc | <Lite5h4dow> im pretty new to anything except python and C++ |
18:56:30 | GitDisc | <Lite5h4dow> and i never touched GUI's since Tkinter was just a mess when i first tried... |
18:57:16 | FromGitter | <zacharycarter> hrm - not sure how I can help besides answering questions / trying to explain what you don't understand |
18:58:15 | GitDisc | <Lite5h4dow> i dont know what alot of it does if im going to be 100% honest |
18:58:29 | GitDisc | <Lite5h4dow> i get the plainly obvious |
18:59:01 | GitDisc | <Lite5h4dow> like windowsize, offsets, but after that im lost |
19:01:24 | FromGitter | <zacharycarter> the names of procs in the nim bindings should line up with the documentation in nuklear.h I believe |
19:01:50 | FromGitter | <zacharycarter> I can try to at some point write some kind of tutorial for using the bindings with common graphics backends / windowing libraries |
19:04:26 | FromGitter | <zacharycarter> Lite5h4dow - looks like there's some docs now avialable for nuklear as well: https://rawgit.com/vurtun/nuklear/master/doc/nuklear.html |
19:06:53 | GitDisc | <Lite5h4dow> oh, sweet |
19:06:56 | GitDisc | <Lite5h4dow> ill take a look |
19:07:05 | GitDisc | <Lite5h4dow> i was sat here looking through your code |
19:07:46 | * | Jesin joined #nim |
19:09:04 | GitDisc | <Lite5h4dow> a tutorial for a n00b like me would definately help |
19:09:05 | * | Jesin quit (Max SendQ exceeded) |
19:09:36 | * | Jesin joined #nim |
19:09:57 | GitDisc | <Lite5h4dow> especially since Nuklear is so nice |
19:10:25 | * | jaco60 quit (Quit: Textual IRC Client: www.textualapp.com) |
19:12:38 | * | el_tejon quit (Quit: el_tejon) |
19:14:14 | * | el_tejon joined #nim |
19:18:39 | GitDisc | <Lite5h4dow> and all the other options atm are just... well.. bad... |
19:19:09 | GitDisc | <Lite5h4dow> no offence to the guy that made Nigui |
19:24:03 | * | Jesin quit (Quit: Leaving) |
19:30:28 | PMunch | What are you using this for Lite5h4dow? |
19:32:27 | PMunch | I would of course recommend trying one of my genui implementations: https://github.com/PMunch/wxnim#the-genui-macro https://github.com/PMunch/gtk3genui#genui https://github.com/PMunch/gtkgenui#genui |
19:33:00 | GitDisc | <Lite5h4dow> well, im looking to make a Text editor |
19:33:12 | GitDisc | <Lite5h4dow> something challenging but not tooooooo put of my league |
19:33:23 | GitDisc | <Lite5h4dow> ive made a simple one with NIgui |
19:33:32 | GitDisc | <Lite5h4dow> but its.. too simple? |
19:33:48 | GitDisc | <Lite5h4dow> its less than 50 lines and looks appauling with no way of me changing it |
19:34:03 | PMunch | Yeah NiGui is still unfortunately still a bit under-developed |
19:34:10 | GitDisc | <Lite5h4dow> yeah |
19:34:20 | GitDisc | <Lite5h4dow> do you have alot of documentation with your UI? |
19:34:39 | PMunch | Well, not much more than what I linked you. |
19:34:57 | GitDisc | <Lite5h4dow> im guessing this isnt Windows compatible since GTK/GTK3 |
19:35:07 | PMunch | Well, if you use the WxWidgets version it is |
19:35:12 | GitDisc | <Lite5h4dow> ok |
19:35:24 | PMunch | And Gtk 2/3 are both windows compatible |
19:35:32 | GitDisc | <Lite5h4dow> what if i want tit to work on Windows and Linux, or do you recommend making a version for each? |
19:35:37 | PMunch | Just look at Gimp which runs fine on Windows |
19:35:39 | GitDisc | <Lite5h4dow> they are? |
19:35:43 | PMunch | Yup |
19:35:48 | GitDisc | <Lite5h4dow> oh, i didnt know that |
19:35:50 | GitDisc | <Lite5h4dow> ok |
19:36:12 | GitDisc | <Lite5h4dow> this looks great |
19:36:31 | PMunch | Well, with WxWidgets you just specify which platform you want to export to and it will use either Gtk for Linux or the Windows native toolkit for Windows |
19:36:50 | GitDisc | <Lite5h4dow> 10/10 IGN |
19:36:57 | PMunch | The idea with the genui macros are to create a thin wrapper around how you would normally use thee toolkit |
19:37:38 | GitDisc | <Lite5h4dow> dude your fucking smart |
19:37:41 | PMunch | So once you learn how the genui macro converts into Gtk/WxWidgets code it should be easy to follow whatever example code you find in another language |
19:37:47 | PMunch | Haha :P |
19:38:19 | GitDisc | <Lite5h4dow> last question, theming? |
19:38:32 | PMunch | Well, with Gtk that's easy |
19:38:42 | PMunch | Just load your CSS as you normally would |
19:38:43 | GitDisc | <Lite5h4dow> windows not so much? |
19:38:50 | PMunch | Well that works on Windows as well |
19:39:27 | PMunch | Normally on Linux though you let the user choose their theme. On Windows you would probably want to ship some theme with your program as the default doesn't look too good |
19:39:41 | GitDisc | <Lite5h4dow> right ok |
19:39:53 | GitDisc | <Lite5h4dow> sir. i applaud you |
19:39:57 | GitDisc | <Lite5h4dow> sir. i applaud you. |
19:39:58 | PMunch | For WxWidgets it will use the system theme when exporting to Gtk, and the Windows version will look like any other Windows program |
19:41:00 | FromGitter | <zacharycarter> Lite5h4dow- Nuklear is an Immediate mode GUI solution - while you can certainly write an editor with it - it's probably not the best solution. |
19:41:14 | * | dylang quit (Remote host closed the connection) |
19:41:19 | GitDisc | <Lite5h4dow> oh ok |
19:41:31 | * | dyln joined #nim |
19:41:38 | GitDisc | <Lite5h4dow> i just find Nuklear pretty and with it being multi platform it cut out alot of BS |
19:42:27 | GitDisc | <Lite5h4dow> but ill lookinto wxNim |
19:42:31 | GitDisc | <Lite5h4dow> ill get it installed |
19:45:15 | PMunch | Yeah is unfortunately the hard part.. :P |
19:45:29 | * | Trustable joined #nim |
19:46:00 | FromGitter | <mratsim> I think a text editor is harder than a tensor library. Just thinking about the data structure to represent the text (ropes?) and the cross platform GUI toolkit … and syntax highlighting |
19:47:22 | GitDisc | <Lite5h4dow> im not going to worry about syntax highlighint just yet |
19:47:51 | GitDisc | <Lite5h4dow> im not going to worry about syntax highlighting and autocomplete till i understand the libraryjust yet |
19:47:52 | FromGitter | <data-man> @Lite5h4dow: Also there is https://github.com/nim-lang/iup bindings (very outdated) to awesome IUP library. |
19:48:12 | GitDisc | <Lite5h4dow> oooh |
19:48:16 | GitDisc | <Lite5h4dow> ill look into that |
19:48:26 | GitDisc | <Lite5h4dow> but i think ill stick to wxnim for now |
19:48:38 | FromGitter | <data-man> And https://github.com/nim-lang/ui - to libui |
19:48:40 | GitDisc | <Lite5h4dow> better to learn one then move to something else than hop between them |
19:48:51 | GitDisc | <Lite5h4dow> i looked at ui |
19:48:57 | GitDisc | <Lite5h4dow> it seems incomplete |
19:49:02 | * | dmi0 joined #nim |
19:49:13 | GitDisc | <Lite5h4dow> ar at least it didnt work when i compiled the examle |
19:49:31 | GitDisc | <Lite5h4dow> @pmunch i cant seem to install it |
19:49:50 | PMunch | What's the problem? |
19:50:38 | GitDisc | <Lite5h4dow> incorrect structure, should contain a single directory... |
19:50:50 | * | Arrrr joined #nim |
19:50:51 | PMunch | Has that become an error now? |
19:51:01 | GitDisc | <Lite5h4dow> apparently |
19:51:07 | PMunch | That used to be a warning. And that code was written before it was even a warning I think.. |
19:51:26 | GitDisc | <Lite5h4dow> want a pastebin? |
19:51:49 | PMunch | Nah, I know the error |
19:51:50 | PMunch | Hold on |
19:52:22 | PMunch | Aah, it appears that there are some other errors as well |
19:52:36 | PMunch | This might take a while. But I'll try to update it to work properly |
19:52:45 | GitDisc | <Lite5h4dow> ❤ |
19:53:03 | GitDisc | <Lite5h4dow> i have so much respect for coders that fix stuff quick |
19:53:13 | GitDisc | <Lite5h4dow> xD |
19:53:27 | GitDisc | <Lite5h4dow> most people wont bother for another week or so xD |
19:53:30 | GitDisc | <Lite5h4dow> thankyou |
19:54:25 | PMunch | Hmm, what is your nimble version? |
19:54:31 | PMunch | nimble --version |
19:55:02 | GitDisc | <Lite5h4dow> v0.8.8 |
19:55:06 | GitDisc | <Lite5h4dow> that seems wrong |
19:55:13 | GitDisc | <Lite5h4dow> have i got an old version? |
19:55:30 | * | nsf joined #nim |
19:55:35 | PMunch | I have 0.8.8 as well |
19:55:39 | PMunch | And it works fine for me |
19:55:43 | GitDisc | <Lite5h4dow> 0.0 |
19:55:52 | PMunch | Wait, are you doing "nimble install wxnim"? |
19:56:05 | PMunch | Or cloning my repo and doing "nimble install" in the base folder? |
19:56:06 | GitDisc | <Lite5h4dow> i cloned it and typed `nimble install wxnim.nimble` |
19:56:21 | FromGitter | <zacharycarter> just type nimble install |
19:56:23 | FromGitter | <zacharycarter> in the root |
19:56:26 | GitDisc | <Lite5h4dow> oh ok |
19:56:42 | GitDisc | <Lite5h4dow> oooooooooooooooh |
19:56:43 | GitDisc | <Lite5h4dow> ok |
19:56:50 | GitDisc | <Lite5h4dow> it installed |
19:56:56 | GitDisc | <Lite5h4dow> im just being dumb again |
19:56:57 | FromGitter | <zacharycarter> \o/ |
19:57:03 | PMunch | Haha |
19:57:26 | PMunch | The nim.cfg in the examples/genuimacro folder has a slight mistake (which I've fixed now) |
19:57:32 | GitDisc | <Lite5h4dow> ok anything else i should do? |
19:57:39 | GitDisc | <Lite5h4dow> og ok |
19:57:50 | GitDisc | <Lite5h4dow> oh ok |
19:57:56 | PMunch | If you add @end to the end of that file you should be able to run "nim cpp -r controllgallery.nim" in that folder and see an example |
19:58:05 | * | dyln is now known as dxg |
19:58:09 | PMunch | If you have installed wxnim from you package manager of course |
19:58:47 | * | jxv quit (Quit: zzz…) |
19:58:52 | GitDisc | <Lite5h4dow> well, i installed it via cloning |
19:59:08 | GitDisc | <Lite5h4dow> because i couldnt install it via `nimble install wxnim` |
19:59:14 | GitDisc | <Lite5h4dow> it said it didnt exist |
19:59:52 | * | jxv joined #nim |
20:00:11 | * | el_tejon quit (Quit: el_tejon) |
20:00:25 | PMunch | Yeah, Araq made the original version. I cloned it and added the genui macro |
20:00:44 | GitDisc | <Lite5h4dow> who is this Araq guy |
20:00:47 | PMunch | And I think Araqs version used to be in Nimble so I couldn't add mine |
20:00:49 | GitDisc | <Lite5h4dow> he seems rather hostile |
20:00:56 | PMunch | He is the guy who made Nim :P |
20:01:00 | GitDisc | <Lite5h4dow> o.o |
20:01:06 | GitDisc | <Lite5h4dow> really?! |
20:01:08 | PMunch | He's not hostile, but he might seem a tad harsh from time to time :P |
20:01:10 | PMunch | Yeah |
20:01:24 | PMunch | I think he's just fed up with silly questions sometimes |
20:01:38 | GitDisc | <Lite5h4dow> well, he called me an idiot for installing nim to programfiles instead of a different folder... |
20:01:59 | PMunch | Haha :P |
20:02:08 | GitDisc | <Lite5h4dow> yeah |
20:02:10 | PMunch | Where did he want you to install it? |
20:02:17 | GitDisc | <Lite5h4dow> he didnt say |
20:02:19 | federico3 | Lite5h4dow: don't take it personally |
20:02:25 | GitDisc | <Lite5h4dow> he just called me a troll and told me to leave |
20:02:28 | PMunch | I haven't used Windows in ages so I have no idea where I'd put it |
20:02:41 | dxg | maybe he was calling you an idiot for using nim on windows(im not) |
20:02:46 | PMunch | Well that's a bit harsh |
20:03:01 | dxg | im kidding, its just hell to try to get working |
20:03:04 | PMunch | dxg, well Araq himself is on Windows so I don't think that's the issue :P |
20:03:06 | GitDisc | <Lite5h4dow> well i have it on my linux machine, but i need windows for gaes dev at Uni and i want to code nim at uni so |
20:03:08 | federico3 | Lite5h4dow: there's a troll that joins the channel just to annoy people |
20:03:17 | PMunch | Well now he's over on a Mac I think |
20:03:38 | PMunch | Yeah, we've had some issues with trolls |
20:03:44 | GitDisc | <Lite5h4dow> ah ok |
20:03:47 | GitDisc | <Lite5h4dow> well thats fine |
20:03:57 | dxg | I swear to god im not one |
20:04:03 | GitDisc | <Lite5h4dow> ditto |
20:04:10 | GitDisc | <Lite5h4dow> im just new to Nim |
20:04:15 | GitDisc | <Lite5h4dow> i love the language |
20:04:16 | dxg | ^same |
20:04:32 | PMunch | That's good, always nice to have new people interested in the language :) |
20:04:57 | federico3 | Lite5h4dow: the troll changes nickname often - hence people get edgy sometimes |
20:04:58 | GitDisc | <Lite5h4dow> its like the best of all the languages ive ever tried |
20:05:07 | dxg | I got a zero on a program recently because I wrote it in cpp and it wouldnt compile on the uni machines because they are using gcc3 or gcc4(depending on server node) |
20:05:08 | dxg | so |
20:05:26 | GitDisc | <Lite5h4dow> its nice, neat, and so easy to understand at a glance (if you understand whats going on) |
20:05:26 | PMunch | gcc3? |
20:05:42 | FromGitter | <zacharycarter> just don't use C++ features |
20:05:48 | dxg | I considered just going balls out and learning nim and compiling to c and then turning that in as my source for the remaining projects |
20:06:02 | FromGitter | <zacharycarter> I wouldn't do that |
20:06:05 | dxg | cmath was what broke it |
20:06:09 | dxg | I'm not going to |
20:06:12 | PMunch | Haha, good luck to your TA's trying to look through your code :P |
20:06:16 | FromGitter | <zacharycarter> the C produced by Nim is not very readable |
20:06:17 | GitDisc | <Lite5h4dow> xD |
20:06:44 | dxg | PMunch: I think if he went through my code at all I wouldn't have gotten a zero for it not compiling |
20:06:51 | dmi0 | hello I'm having problems with karax in FF 58.0.2, (i think) i have the same or similar problem with the Nim Documentation, in chrome it works fine, is there already a bug report for this issue? |
20:06:52 | dxg | so I think I'd be safe there |
20:07:03 | FromGitter | <zacharycarter> what is the issue dmi0? |
20:07:39 | GitDisc | <Lite5h4dow> right well Pmunch, is there anything i should do before i get my feet wet with your library? |
20:08:06 | PMunch | Well, when I was a TA we had a requirement that it must compile on the university machines. It's waay to much work for the TA to decide if you just handed in uncompileable code or if it's just a compatibility issue. |
20:08:06 | dxg | FromGitter: I know its not readable I've looked at it before, and I thought it would be kind of funny |
20:08:07 | FromGitter | dxg, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
20:08:22 | dxg | woops |
20:08:24 | PMunch | Lite5h4dow, maybe have a look at the control-gallery example? |
20:08:37 | GitDisc | <Lite5h4dow> ok cool |
20:08:39 | PMunch | Or the thread example if you want something with a bit more actual work |
20:09:04 | GitDisc | <Lite5h4dow> ill examine both and see if i can create some stuff |
20:09:14 | * | MJCaley quit (Quit: MJCaley) |
20:09:16 | GitDisc | <Lite5h4dow> if i get stuck should i message you on here? |
20:09:20 | PMunch | Sure |
20:09:37 | GitDisc | <Lite5h4dow> ty,ty |
20:10:02 | * | el_tejon joined #nim |
20:10:04 | GitDisc | <Lite5h4dow> right well if you dont hear from me again tonight enjoy your day / night |
20:10:24 | dmi0 | @FromGitter, in my karax test i get: clientPostRenderCallback_84944 is not a function, just tried the documentation and it works. |
20:10:24 | FromGitter | dmi0, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
20:10:35 | PMunch | You can also have a look at this: http://zetcode.com/gui/wxwidgets/firstprograms/ for some WxWidgets specific stuff |
20:11:06 | GitDisc | <Lite5h4dow> sweet |
20:12:08 | dmi0 | @zacharycarter, in my karax test i get: clientPostRenderCallback_84944 is not a function, just tried the documentation and it works. |
20:12:10 | dxg | PMunch: yeah I understand why they do it I'm not mad at my TA, but I am frustrated by the fact that the servers are four versions of gcc out of date, and for some reason that means I can't compile because I tried to use pow() & ios::in for an fstream object |
20:12:33 | PMunch | Yeah that sucks :P |
20:12:41 | dxg | anyway, this is nim, channel so I'll stop talking about cpp, sorry to force a tangent |
20:13:43 | * | rokups quit (Quit: Connection closed for inactivity) |
20:14:33 | FromGitter | <zacharycarter> dmi0: only issue I see related to that is - https://github.com/pragmagic/karax/issues/50 - but I'm not a maintainer of the repo - so I have no clue really :( sory |
20:15:11 | PMunch | dxg, don't worry about it. When there aren't anyone asking Nim questions this channel can get pretty off-topic :P |
20:15:24 | dmi0 | yeah, documentation is also broken from FF, when I use the searchbox for a seccond time i get this message: TypeError: value_28192 is undefined |
20:15:25 | PMunch | As long as it doesn't get in the way of actual Nim talk it's probably fine |
20:15:30 | * | vivus joined #nim |
20:15:40 | PMunch | dmi0, hmm that really doesn't sound good |
20:15:44 | PMunch | And it's only in FF? |
20:16:34 | dmi0 | as far as I can tell, yes, I mean I just tested in chrome and it works fine. |
20:18:07 | FromGitter | <mratsim> no it’s still a warning |
20:18:28 | FromGitter | <mratsim> oops Gitter not being refreshed, was talking about the package structure |
20:19:32 | PMunch | dmi0, and you said this was happening for the search in the official docs as well? |
20:19:59 | dmi0 | @PMunch, yes |
20:20:13 | PMunch | How do you replicate? |
20:20:33 | GitDisc | <Lite5h4dow> oh, PMunch, i did have one last questio that i almost forgot to ask... |
20:20:42 | GitDisc | <Lite5h4dow> making a CSS theme for it |
20:21:09 | GitDisc | <Lite5h4dow> i dont see anything about it on your git |
20:21:24 | PMunch | Lit5h4dow, yeah WxWidgets doesn't have a way to set themes |
20:21:32 | GitDisc | <Lite5h4dow> ah, rip |
20:21:40 | PMunch | But on Linux it will use your Gtk theme |
20:21:53 | GitDisc | <Lite5h4dow> ok, good enough for now |
20:22:08 | dmi0 | @PMunch, open FF 58.0.2, search something using the search input box, then try to make another search |
20:23:09 | PMunch | Hmm, it works fine here |
20:23:16 | dmi0 | @zacharycarter, is this issue related to some change in karax, did the API changed ? |
20:23:20 | PMunch | FF 58.0.2 64-bit on Linux |
20:23:37 | PMunch | dmi0, link to the page you're having issues with? |
20:25:59 | GitDisc | <Lite5h4dow> what about your GTK3 package, will it be easier to apply a theme? and will it be any more difficult to work with windows? |
20:26:28 | dmi0 | @PMunch, https://nim-lang.org/docs/system.html |
20:26:49 | Arrrr | What is the nim equivalent of this https://github.com/dgryski/go-perfbook ? |
20:26:50 | PMunch | Lite5h4dow, Gtk3 is definitely easier to theme |
20:27:06 | PMunch | You can just tell it to load a CSS theme from within the code |
20:27:12 | GitDisc | <Lite5h4dow> what about windows preformance? |
20:27:12 | PMunch | And it will override the Linux theme |
20:27:14 | dmi0 | PMunch, what version of FF are you using? |
20:27:53 | PMunch | Performance is the same as Linux, but you need to install Gtk separately or bundle it with your program (systems without a package manager..) |
20:28:11 | PMunch | dmi0, 58.0.2 64-bit Linux |
20:28:13 | GitDisc | <Lite5h4dow> alright, i dont have a problem with that |
20:28:18 | GitDisc | <Lite5h4dow> atom packages electron |
20:28:21 | GitDisc | <Lite5h4dow> so i guess its ok |
20:28:42 | PMunch | Yeah, not so good for disk-space. But that's rarely a problem nowadays |
20:28:52 | GitDisc | <Lite5h4dow> yeah |
20:29:09 | GitDisc | <Lite5h4dow> would you recommend GTK or wx for what i want to do? |
20:29:23 | PMunch | dmi0, ah. On that page I also get errors |
20:29:57 | PMunch | https://nim-lang.org/docs/lib.html |
20:30:01 | PMunch | That works fine with search |
20:30:07 | PMunch | But I do get another not defined error |
20:31:25 | GitDisc | <Lite5h4dow> for a text editor i mean |
20:31:49 | Yardanico | raw win32 api :) |
20:31:59 | Yardanico | if you want less size, more performance |
20:32:00 | PMunch | Well, I'd say Gtk3 might be easier to work with.. |
20:32:08 | Yardanico | but code will be uglier and harder to write |
20:32:09 | PMunch | Yardanico, but then it won't run on Linux.. |
20:32:18 | GitDisc | <Lite5h4dow> alrighty |
20:32:19 | PMunch | And you can't use genui :) |
20:32:24 | Yardanico | PMunch, well, there's wine and IDK which platform Lite wants to use |
20:32:34 | Yardanico | you can run DX11 games in wine nowadays |
20:32:38 | GitDisc | <Lite5h4dow> im on windows and linux |
20:32:52 | GitDisc | <Lite5h4dow> i have bot linux and windows machines |
20:32:59 | GitDisc | <Lite5h4dow> and want t omake a text editor for both |
20:33:04 | GitDisc | <Lite5h4dow> specifically for nim |
20:33:06 | Yardanico | well I have linux and windows, but on one machine :) |
20:33:06 | dmi0 | PMunch, it is the second attempt that fails |
20:33:09 | PMunch | Yardanico, well yeah. You could run it on Linux. But saying that Wine makes win32 cross-platform isn't really correct :P |
20:33:22 | dmi0 | no matter te page |
20:33:30 | PMunch | dmi0, on the one I linked as well? |
20:33:37 | dom96 | Anybody familiar with the usage of Nim's endians module? |
20:33:38 | PMunch | I can search as much as I'd like on that one |
20:34:03 | * | jxv quit (Quit: zzz…) |
20:34:20 | dmi0 | ok, but follow whatever link it presents |
20:34:39 | dmi0 | and then search again |
20:35:36 | PMunch | Well, that page links to different pages.. |
20:37:41 | * | demian_ joined #nim |
20:38:12 | * | Arrrr quit (Quit: Leaving.) |
20:39:01 | * | demian_ is now known as dmi0_ |
20:39:36 | Yardanico | dom96, well, AFAIK you just give it a pointer and it gives you another pointer |
20:40:02 | FromGitter | <mratsim> @dom96, I’m an endian magician :P |
20:40:46 | FromGitter | <mratsim> I spent a whole week dealing with Ethereum endianness fog in the spec |
20:40:56 | * | dmi0 quit (Ping timeout: 276 seconds) |
20:41:12 | FromGitter | <mratsim> Basically it’s used like “shallowCopy" |
20:41:20 | * | dmi0_ is now known as dmi0 |
20:42:49 | GitDisc | <Lite5h4dow> why in hell doesnt gtk just have an installer |
20:43:37 | GitDisc | <Lite5h4dow> for windows i mean |
20:43:39 | PMunch | It does, doesn't it? |
20:43:54 | GitDisc | <Lite5h4dow> no, its telling me to download a package manager |
20:44:00 | GitDisc | <Lite5h4dow> and install it like that for windows |
20:44:02 | GitDisc | <Lite5h4dow> http://www.msys2.org/ |
20:44:03 | GitDisc | <Lite5h4dow> that |
20:44:11 | GitDisc | <Lite5h4dow> https://www.gtk.org/download/windows.php |
20:44:14 | GitDisc | <Lite5h4dow> thats the page |
20:44:20 | GitDisc | <Lite5h4dow> unless im looking at the wrong thing |
20:44:33 | Yardanico | "Note: These instructions are intended for developers wanting to develop applications based on GTK+, not for end-users." |
20:44:45 | dom96 | Hrm, why is copying bytes into a struct so damn difficult |
20:45:03 | Yardanico | dom96, are you parsing some binary stuff? |
20:45:08 | dom96 | yeah |
20:45:21 | Yardanico | dom96, IDK if it can be used in your case, but try - https://github.com/xomachine/NESM |
20:45:27 | GitDisc | <Lite5h4dow> @yarndaco thats exactly what im doing isnt it? |
20:45:30 | PMunch | dom96, Might I recommend https://github.com/PMunch/binaryparse |
20:45:48 | GitDisc | <Lite5h4dow> im making a program that uses the GTK3 library |
20:46:02 | Yardanico | Well, then what's your problem? |
20:46:03 | PMunch | Lite5h4dow, hmm yeah that looks right. But I distinctly remember there being a Gtk3 Windows installer |
20:46:05 | Yardanico | Just follow the instructions |
20:46:22 | GitDisc | <Lite5h4dow> hmm ok |
20:46:26 | Yardanico | and really, developing gtk apps is easier on linux :) |
20:46:48 | GitDisc | <Lite5h4dow> but i want to make sure it works on linux too, and have a theeming system |
20:47:04 | GitDisc | <Lite5h4dow> and since GTK is the only one with an available library for nim |
20:47:13 | GitDisc | <Lite5h4dow> (that i can understand) thanks to pmunch |
20:47:21 | dom96 | PMunch: Could use some more examples |
20:47:31 | PMunch | dom96, yeah. Sorry about that :P |
20:47:42 | dom96 | I feel like it's a bit overkill for my use case though |
20:47:58 | dom96 | I have a struct, I know the data is in little endian, I just want to convert the data into that struct. |
20:48:05 | FromGitter | <mratsim> @dom96 check my pure endian/stream code for parsing the simple MNIST files: https://github.com/mratsim/Arraymancer/blob/master/src/datasets/mnist.nim |
20:48:20 | PMunch | dom96, did you see this though: https://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L622 |
20:48:35 | FromGitter | <mratsim> This is what you need: https://github.com/mratsim/Arraymancer/blob/cffa052a44d95cf231e1a2100dd9d5bf9bb9b36e/src/datasets/mnist.nim#L55-L57 |
20:48:41 | dom96 | PMunch: yep, that's why I said "more examples" :P |
20:48:55 | PMunch | Haha, okay. Yeah it could do with some more examples |
20:49:01 | PMunch | And proper documentation |
20:49:05 | dom96 | mratsim: yeah, I'm trying that. For some reason it's not working. |
20:49:30 | PMunch | I tried to do the same thing you are doing though a while back (in C++), but I just gave up and used Nim and binaryparse instead |
20:49:46 | dom96 | I've got a cstring though |
20:49:52 | dom96 | Maybe I'm missing something |
20:49:58 | FromGitter | <mratsim> maybe you need to dereference? |
20:49:59 | * | el_tejon quit (Quit: el_tejon) |
20:50:15 | dom96 | I can cast the cstring to a `ptr MyStruct` and that works fine |
20:50:17 | FromGitter | <mratsim> or take a ptr of the struct |
20:50:22 | dom96 | But I have feeling that's not the right way to do it :) |
20:52:44 | * | jxv joined #nim |
20:52:52 | dom96 | okay, so 'addr cstring' was wrong |
20:53:00 | dom96 | damn this stuff is far too subtle |
21:07:51 | * | miran quit (Quit: Konversation terminated!) |
21:08:34 | * | jxv quit (Quit: zzz…) |
21:12:28 | * | el_tejon joined #nim |
21:15:54 | * | yglukhov quit (Remote host closed the connection) |
21:22:11 | PMunch | Slow and steady progress on the protobuf project. It now actually generates types for the different stuff! |
21:22:48 | * | PMunch quit (Quit: leaving) |
21:29:42 | * | dmi0_ joined #nim |
21:31:22 | * | el_tejon quit (Quit: el_tejon) |
21:32:26 | * | dmi0 quit (Ping timeout: 265 seconds) |
21:42:48 | * | el_tejon joined #nim |
21:47:12 | dmi0_ | ok, in chrome documentation is not working either |
21:57:01 | * | yglukhov joined #nim |
22:01:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:05:46 | * | el_tejon quit (Quit: el_tejon) |
22:08:09 | * | solitudesf quit (Ping timeout: 252 seconds) |
22:10:08 | * | Trustable quit (Remote host closed the connection) |
22:13:35 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:14:35 | * | dom96 wonders why there is no littleEndian8 |
22:15:34 | dom96 | oh, duh |
22:18:48 | * | el_tejon joined #nim |
22:20:50 | * | natrys quit (Quit: natrys) |
22:22:38 | * | dmi0__ joined #nim |
22:25:16 | * | dmi0_ quit (Ping timeout: 256 seconds) |
22:29:54 | * | jxv joined #nim |
22:35:27 | * | jxv quit (Quit: zzz…) |
22:40:20 | * | BitPuffin quit (Remote host closed the connection) |
22:44:41 | * | el_tejon quit (Quit: el_tejon) |
22:51:15 | FromGitter | <mratsim> lol |
22:52:04 | FromGitter | <mratsim> nice one dom96 :P |
22:53:08 | dom96 | I don't do much binary manipulation :) |
22:53:10 | * | dmi0__ quit (Ping timeout: 256 seconds) |
23:01:48 | * | el_tejon joined #nim |
23:11:13 | * | jxv joined #nim |
23:19:11 | * | el_tejon quit (Quit: el_tejon) |
23:19:38 | * | vlad1777d quit (Ping timeout: 276 seconds) |
23:24:58 | * | MJCaley joined #nim |
23:40:52 | * | el_tejon joined #nim |
23:54:30 | * | dmi0__ joined #nim |
23:59:47 | * | MJCaley quit (Quit: MJCaley) |