<< 04-03-2018 >>

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:01FromGitter<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:04FromGitter<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:32ipjk_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:07FromGitter<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:37FromGitter<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:40FromGitter<gogolxdong> It's about the ecosystem constituted of documents and community localized.
04:21:36FromGitter<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:44FromGitter<mratsim> @ipjk_, thanks :)
08:54:53FromGitter<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:41FromGitter<mratsim> There is this fiber PoC as well: https://github.com/mogud/nimfiber
08:55:51FromGitter<mratsim> @2vg*
08:58:56*yglukhov joined #nim
09:01:29miranhey mratsim! i had to go to sleep yesterday, but this morning i have checked what has been written here and on github
09:06:52mirannow 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:28miranah, it seems it's because the wanted dimensions are too big for nim's array to handle!?
09:27:42FromGitter<2vg> wow, want to develop this
09:28:30FromGitter<2vg> Rust's May seem faster than tokio-minihttp.
09:39:58FromGitter<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:25Yardanico@2vg is your benchmarking code you've used for comparasion with tokio-minihttp is available somewhere?
09:43:27YardanicoI didn't find it
09:44:20miran@mratsim: if i use seqs, i back on the newSeqWith problem, no?
09:44:37FromGitter<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:10FromGitter<mratsim> you can use the `fill` proc in the `algorithm` module to fill your seq with 1
09:45:20FromGitter<mratsim> or use a for loop ;)
09:45:38miranany point of using seq of arrays?
09:46:18FromGitter<mratsim> yes, less indirections, seq of seq or seq of ref arrays would require dereferencing 2 pointers, seq of arrays only one
09:47:09FromGitter<mratsim> btw do you have the Python benchmark? I’ll add it to the open issue
09:47:32miranyeah, i'll post it there
09:47:39*dylan joined #nim
09:50:22miranposted. try running it to compare both speed and memory consumption (for me is twice as good in both compartments)
09:51:07miranhas your new commit improved the initialization? if so, by how much?
09:51:14*rokups joined #nim
09:52:03FromGitter<mratsim> 33% on my machine
09:52:11FromGitter<mratsim> sorry 3x
09:52:36FromGitter<mratsim> I just used a for loop instead of newSeqWith
09:53:18miranniiiceee!!
09:54:42mirani don't have much experience with nimble - how do i switch to AM devel version? do i first uninstall the stable one?
09:56:22FromGitter<mratsim> nimble install https://github.com/mratsim/Arraymancer@#head
09:56:39FromGitter<mratsim> or maybe just arraymancer@#head would work
09:57:46miranno need to uninstall current version?
10:01:13FromGitter<mratsim> no
10:01:36*rauss quit (Read error: Connection reset by peer)
10:04:06FromGitter<2vg> @Yardanico That code does not exist now. However, it can easily be reproduced.
10:04:10*rauss joined #nim
10:09:05miran@mratsim: from 13-14 seconds to 6-7 seconds! very nice!!
10:09:27FromGitter<mratsim> so now it’s faster than Python?
10:10:23FromGitter<2vg> for example, such code https://ghostbin.com/paste/brb7m
10:10:59miranlet me check
10:11:12FromGitter<2vg> @Yardanico *
10:14:17Yardanico@2vg thanks
10:15:19*xkapastel quit (Quit: Connection closed for inactivity)
10:15:48miran@mratsim: python is around 6 sec, so basically now they have the same speed (AM still uses 2x memory than python)
10:16:19FromGitter<mratsim> okay. I’m working on further improvements
10:16:30FromGitter<mratsim> not sure how long it would take though
10:22:58miranno problem, thank you for dealing with this already! much appreciated!
10:30:17miranfor completeness sake: when i change the problem and have much more timesteps/iterations, nim/AM (expectedly) becomes faster than python
10:31:44miranfor 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:27miran(in the example before, it was drop from 13-14 seconds to 7 sec)
10:32:30FromGitter<mratsim> thank you
10:33:01FromGitter<mratsim> I have a huge intuition that my template usage was duplicating code
10:33:51FromGitter<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:26FromGitter<krux02> @mratsim: yes
11:07:42FromGitter<krux02> @mratsim : http://ix.io/SiM/nim
11:07:58FromGitter<krux02> http://ix.io without highlighting
11:08:19FromGitter<krux02> sorry I mean this: http://ix.io/SiM
11:11:34*r3d9u11 quit (Remote host closed the connection)
11:15:06FromGitter<mratsim> Thanks, fixing that
11:29:05*xkapastel joined #nim
11:40:07FromGitter<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:02FromGitter<mratsim> Maybe use a no-op proc
11:54:07FromGitter<krux02> @mratsim can you give me a bit more context?
11:54:54FromGitter<krux02> what you always can do is use pointers.
11:55:47*solitudesf joined #nim
12:01:56FromGitter<krux02> @mratsim http://ix.io/SjR/nim
12:02:33*Snircle joined #nim
12:03:04FromGitter<krux02> if getInt would be evaluated each time, the inceraes would not work
12:09:24FromGitter<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:59FromGitter<krux02> I thought about it as well and Araq brought enums into the field.
12:19:49FromGitter<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:30FromGitter<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:06FromGitter<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:07FromGitter<tim-st> proc test*(flag=false): int = ⏎ when flag: result = 20 ⏎ else: result = 21
13:12:25FromGitter<tim-st> I tried with template but had no luck
13:13:10*jaco60 joined #nim
13:17:49FromGitter<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:48FromGitter<nitely> @tim-st I think `template test*(result: var int, flag=false) = ...`
13:21:37FromGitter<nitely> there is no result var in templates as in procs iirc
13:22:50FromGitter<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:43FromGitter<tim-st> so that I can't pass `var b = false` only `const b = false` ?
13:25:15FromGitter<tim-st> it seems `flag: static[bool]` does the trick
13:26:17FromGitter<tim-st> no, only one example is fixed with this...
13:27:35FromGitter<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:07FromGitter<tim-st> now, I always have to type `call(var, false)`
13:30:19FromGitter<nitely> the template should work
13:30:47FromGitter<nitely> if you use `when` then that param must be provided at compile time (const)
13:36:24FromGitter<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:33FromGitter<nitely> not sure if that's idiomatic though
13:38:03FromGitter<nitely> maybe someone can provide a better way
13:40:33planetis[m]dom96: it makes a good point that the difference is always the interval lenght. the other points seem subjective
13:44:02FromGitter<tim-st> @nitely Thanks for the answer!
13:45:54FromGitter<tim-st> I see the bug is known: https://github.com/nim-lang/Nim/issues/6928
13:46:31FromGitter<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:47FromGitter<nitely> @tim-st well, you can always use proc overloading to workaround that bug
13:52:45FromGitter<nitely> `proc test*(): int = test(false)`
13:53:21FromGitter<tim-st> Of course, I forgot that, thank you very much!
13:54:23FromGitter<data-man> @nitely: Can you add Unicode 11.0 to nim-unicodedb, please?
13:54:40FromGitter<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:48FromGitter<nitely> @data-man is that out?
13:54:51FromGitter<zetashift> type is supposed to represent a tree
13:55:06FromGitter<data-man> @nitely: No, beta.
13:55:59FromGitter<data-man> Emoji 11.0 is out.
13:56:08FromGitter<nitely> I would rather not, then
13:56:38FromGitter<nitely> so, you need support for the emojis?
13:57:36FromGitter<data-man> Yes!
13:57:56*SenasOzys joined #nim
13:59:28FromGitter<nitely> XD, ok, I'll update it
13:59:41FromGitter<data-man> I have an idea: to add the Unicode version for downloading for your gen-scripts.
14:00:56FromGitter<nitely> that would be nice. But I don't think it will always work without code changes
14:01:37FromGitter<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:12FromGitter<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:57FromGitter<data-man> Yes, but the suffixes of the files sometimes changed (*-11.0.0d1.txt) :-)
14:06:03FromGitter<nitely> ah, did not know that
14:07:29FromGitter<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:18FromGitter<data-man> https://www.unicode.org/Public/11.0.0/ucd/
14:09:42FromGitter<data-man> https://www.unicode.org/Public/emoji/11.0/
14:11:53FromGitter<nitely> @data-man are you using unicodedb?
14:12:09FromGitter<data-man> Yes
14:12:23FromGitter<nitely> :O awesome
14:12:25FromGitter<data-man> It's great, thanks!
14:13:12FromGitter<nitely> you are welcome :)
14:13:30FromGitter<nitely> I'm happy someone actually uses it XD
14:15:19FromGitter<data-man> But I'm thinking about reducing the DB-size. I like how it's made in D.
14:16:26FromGitter<nitely> how?
14:21:24FromGitter<data-man> With tries and intervals
14:21:29FromGitter<data-man> https://github.com/dlang/phobos/blob/master/std/internal/unicode_tables.d
14:22:51FromGitter<data-man> Also D's std.uni has CodepointSet
14:27:26FromGitter<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:52FromGitter<data-man> D's std.uni has good toSourceCode func: https://github.com/dlang/phobos/blob/master/std/uni.d#L2762
14:41:57FromGitter<nitely> I'm reading https://dlang.org/phobos/std_uni.html "Construction of lookup tables " section and the source code...
14:42:06FromGitter<nitely> they do the same as I did...
14:42:23FromGitter<nitely> multi-stage tables (a kind of trie)
14:42:38*el_tejon quit (Quit: el_tejon)
14:43:34FromGitter<nitely> it would be interesting to try interval tries and check the log(n) access vs size savings is worth it...
14:44:36FromGitter<nitely> I guess it would in CPUs with a small cache, maybe..
14:45:53FromGitter<data-man> How about https://github.com/JuliaLang/utf8proc ? ⏎ I think that it's more compact, but probably is slowly.
14:48:04FromGitter<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:25FromGitter<nitely> nah, the data is here: https://raw.githubusercontent.com/JuliaLang/utf8proc/master/utf8proc_data.c
14:53:10FromGitter<data-man> I know, I showed the data structure. :-)
14:53:13*el_tejon joined #nim
14:53:13FromGitter<nitely> I can generate the data in multi column to make it look more compact :P
14:54:05FromGitter<data-man> It would be great!
14:55:26FromGitter<nitely> but it would take the same amount of memory XD
14:57:16FromGitter<data-man> It doesn't matter. Look matters. :-)
14:59:19FromGitter<nitely> they use multiple ints to store lowercase, cased, etc properties
14:59:30FromGitter<nitely> I use a single integer...
15:00:21*nsf quit (Quit: WeeChat 2.0.1)
15:00:34FromGitter<nitely> I doubt they care a lot about optimizations
15:01:55FromGitter<nitely> but also, nim has "dead code elimination" so I can separate lookup tables better
15:02:33FromGitter<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:24niniggaHello, is this result expected? https://play.nim-lang.org/?gist=2801bdff1f0d96ae1fa65b447ecf0314
15:06:28FromGitter<data-man> @ninigga: Yes
15:08:04FromGitter<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:21miranninigga: if you want to iterate from a larger to a smaller value, you need to use `countdown`
15:09:24FromGitter<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:14niniggait just looks like a bug, it should probably throw a compilation error
15:11:08FromGitter<nitely> @data-man that pascal code generates hash tables only AFAICT
15:11:13FromGitter<data-man> @nitely: https://github.com/BeRo1985/flre A fast light regular expression library for Pascal :-)
15:11:26miranninigga: i would rather see `..` work in both cases (low to high, and high to low), but unfortunately this is not happening....
15:13:32FromGitter<data-man> @nitely: https://github.com/BeRo1985/pucu/blob/master/src/PUCUCode.pas
15:14:01FromGitter<nitely> miran: I would too, but lately I have been relaying on "invalid ranges" too much :P
15:14:45FromGitter<nitely> I like how they just don' enter the loop
15:16:29mirani guess it is a matter of getting used do a behaviour
15:16:39miran*to
15:21:16*yglukhov joined #nim
15:28:07FromGitter<nitely> @data-man ah that code seems to use multi-stage tables
15:30:01FromGitter<nitely> the regex library seems neat, I'll take a look at the many optimizations it has
15:30:58FromGitter<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:41planetis[m]ninigga: https://nim-lang.org/docs/tut1.html#control-flow-statements-for-statement its there if you like to read docs
15:33:16FromGitter<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:48FromGitter<nitely> but nim-regex will generate a static DFA one day, then it will be way faster
15:37:39jaco60In 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:26FromGitter<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:39FromGitter<dom96> Jaco60: look at the examples at the top of the module docs
15:41:03FromGitter<dom96> https://nim-lang.org/docs/httpclient.html#retrieving-a-website
15:42:05jaco60@dom96: i understand how the proc work... I don't understand why they are flagged deprecated
15:51:52niniggaguys, how does one get the character length of a string that uses non-ascii?
15:55:24Yardaniconinigga, use unicode module :)
15:55:39Yardanicohttps://nim-lang.org/docs/unicode.html#runeLen,string
15:56:10niniggayeah, thansk
15:56:14Yardanico@nitely - I suppose nim-regex will support unicode in the future? or it already does that?
15:56:20Yardanicooh, I see, it does! cool
15:58:29FromGitter<nitely> Yardanico: actually, I've to add support for raw bytes XD
15:59:42FromGitter<nitely> AKA ascii. It can't be used to match data in some binary file, I think...
16:00:16FromGitter<nitely> it's only good for text
16:00:20Yardanico@nitely - I can use nim-regex at runtime, right? I mean match to regexes which are only known at runtime
16:01:52FromGitter<nitely> yes, you can match at runtime
16:02:08FromGitter<nitely> you can't match at compile time because of nim bugs
16:02:28YardanicoOk, thanks to your answers! your library looks very cool
16:02:37FromGitter<nitely> all yo can do at compile time is compiling the regex expression
16:02:54FromGitter<nitely> no problem
16:03:11FromGitter<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:40FromGitter<nitely> Yardanico: ah, I misread that. You can compile expressions at runtime. Just use `let pattern = toPattern(r"regex")`
16:06:11jaco60@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:04FromGitter<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:00miranjaco60: what do you propose? to remove deprecated procs from docs?
16:12:17jaco60@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:37FromGitter<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:59FromGitter<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:35FromGitter<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:10FromGitter<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:55FromGitter<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:50FromGitter<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:03Yardanico@mratsim: he said he already has next project
17:23:05Yardanicoinline-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:19Araqdom96, that Dijkstra article is well known. it's also wrong for the reasons I've mentioned two or three hundred times here.
17:34:12Araqbut 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:38federico3is 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:54GitDisc<Lite5h4dow> Is the guy that made the bindings for NimNuklear here?
18:52:13FromGitter<zacharycarter> yes
18:52:20GitDisc<Lite5h4dow> 😮
18:52:38*r3d9u11 quit (Remote host closed the connection)
18:52:47GitDisc<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:14GitDisc<Lite5h4dow> do you know where i can look for some documentation?
18:54:09FromGitter<zacharycarter> most of the docs are in the nuklear header themselves :/ there
18:54:24FromGitter<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:43GitDisc<Lite5h4dow> i have no idea whats going on though xD
18:56:05GitDisc<Lite5h4dow> im pretty new to anything except python and C++
18:56:30GitDisc<Lite5h4dow> and i never touched GUI's since Tkinter was just a mess when i first tried...
18:57:16FromGitter<zacharycarter> hrm - not sure how I can help besides answering questions / trying to explain what you don't understand
18:58:15GitDisc<Lite5h4dow> i dont know what alot of it does if im going to be 100% honest
18:58:29GitDisc<Lite5h4dow> i get the plainly obvious
18:59:01GitDisc<Lite5h4dow> like windowsize, offsets, but after that im lost
19:01:24FromGitter<zacharycarter> the names of procs in the nim bindings should line up with the documentation in nuklear.h I believe
19:01:50FromGitter<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:26FromGitter<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:53GitDisc<Lite5h4dow> oh, sweet
19:06:56GitDisc<Lite5h4dow> ill take a look
19:07:05GitDisc<Lite5h4dow> i was sat here looking through your code
19:07:46*Jesin joined #nim
19:09:04GitDisc<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:57GitDisc<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:39GitDisc<Lite5h4dow> and all the other options atm are just... well.. bad...
19:19:09GitDisc<Lite5h4dow> no offence to the guy that made Nigui
19:24:03*Jesin quit (Quit: Leaving)
19:30:28PMunchWhat are you using this for Lite5h4dow?
19:32:27PMunchI 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:00GitDisc<Lite5h4dow> well, im looking to make a Text editor
19:33:12GitDisc<Lite5h4dow> something challenging but not tooooooo put of my league
19:33:23GitDisc<Lite5h4dow> ive made a simple one with NIgui
19:33:32GitDisc<Lite5h4dow> but its.. too simple?
19:33:48GitDisc<Lite5h4dow> its less than 50 lines and looks appauling with no way of me changing it
19:34:03PMunchYeah NiGui is still unfortunately still a bit under-developed
19:34:10GitDisc<Lite5h4dow> yeah
19:34:20GitDisc<Lite5h4dow> do you have alot of documentation with your UI?
19:34:39PMunchWell, not much more than what I linked you.
19:34:57GitDisc<Lite5h4dow> im guessing this isnt Windows compatible since GTK/GTK3
19:35:07PMunchWell, if you use the WxWidgets version it is
19:35:12GitDisc<Lite5h4dow> ok
19:35:24PMunchAnd Gtk 2/3 are both windows compatible
19:35:32GitDisc<Lite5h4dow> what if i want tit to work on Windows and Linux, or do you recommend making a version for each?
19:35:37PMunchJust look at Gimp which runs fine on Windows
19:35:39GitDisc<Lite5h4dow> they are?
19:35:43PMunchYup
19:35:48GitDisc<Lite5h4dow> oh, i didnt know that
19:35:50GitDisc<Lite5h4dow> ok
19:36:12GitDisc<Lite5h4dow> this looks great
19:36:31PMunchWell, 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:50GitDisc<Lite5h4dow> 10/10 IGN
19:36:57PMunchThe idea with the genui macros are to create a thin wrapper around how you would normally use thee toolkit
19:37:38GitDisc<Lite5h4dow> dude your fucking smart
19:37:41PMunchSo 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:47PMunchHaha :P
19:38:19GitDisc<Lite5h4dow> last question, theming?
19:38:32PMunchWell, with Gtk that's easy
19:38:42PMunchJust load your CSS as you normally would
19:38:43GitDisc<Lite5h4dow> windows not so much?
19:38:50PMunchWell that works on Windows as well
19:39:27PMunchNormally 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:41GitDisc<Lite5h4dow> right ok
19:39:53GitDisc<Lite5h4dow> sir. i applaud you
19:39:57GitDisc<Lite5h4dow> sir. i applaud you.
19:39:58PMunchFor WxWidgets it will use the system theme when exporting to Gtk, and the Windows version will look like any other Windows program
19:41:00FromGitter<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:19GitDisc<Lite5h4dow> oh ok
19:41:31*dyln joined #nim
19:41:38GitDisc<Lite5h4dow> i just find Nuklear pretty and with it being multi platform it cut out alot of BS
19:42:27GitDisc<Lite5h4dow> but ill lookinto wxNim
19:42:31GitDisc<Lite5h4dow> ill get it installed
19:45:15PMunchYeah is unfortunately the hard part.. :P
19:45:29*Trustable joined #nim
19:46:00FromGitter<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:22GitDisc<Lite5h4dow> im not going to worry about syntax highlighint just yet
19:47:51GitDisc<Lite5h4dow> im not going to worry about syntax highlighting and autocomplete till i understand the libraryjust yet
19:47:52FromGitter<data-man> @Lite5h4dow: Also there is https://github.com/nim-lang/iup bindings (very outdated) to awesome IUP library.
19:48:12GitDisc<Lite5h4dow> oooh
19:48:16GitDisc<Lite5h4dow> ill look into that
19:48:26GitDisc<Lite5h4dow> but i think ill stick to wxnim for now
19:48:38FromGitter<data-man> And https://github.com/nim-lang/ui - to libui
19:48:40GitDisc<Lite5h4dow> better to learn one then move to something else than hop between them
19:48:51GitDisc<Lite5h4dow> i looked at ui
19:48:57GitDisc<Lite5h4dow> it seems incomplete
19:49:02*dmi0 joined #nim
19:49:13GitDisc<Lite5h4dow> ar at least it didnt work when i compiled the examle
19:49:31GitDisc<Lite5h4dow> @pmunch i cant seem to install it
19:49:50PMunchWhat's the problem?
19:50:38GitDisc<Lite5h4dow> incorrect structure, should contain a single directory...
19:50:50*Arrrr joined #nim
19:50:51PMunchHas that become an error now?
19:51:01GitDisc<Lite5h4dow> apparently
19:51:07PMunchThat used to be a warning. And that code was written before it was even a warning I think..
19:51:26GitDisc<Lite5h4dow> want a pastebin?
19:51:49PMunchNah, I know the error
19:51:50PMunchHold on
19:52:22PMunchAah, it appears that there are some other errors as well
19:52:36PMunchThis might take a while. But I'll try to update it to work properly
19:52:45GitDisc<Lite5h4dow> ❤
19:53:03GitDisc<Lite5h4dow> i have so much respect for coders that fix stuff quick
19:53:13GitDisc<Lite5h4dow> xD
19:53:27GitDisc<Lite5h4dow> most people wont bother for another week or so xD
19:53:30GitDisc<Lite5h4dow> thankyou
19:54:25PMunchHmm, what is your nimble version?
19:54:31PMunchnimble --version
19:55:02GitDisc<Lite5h4dow> v0.8.8
19:55:06GitDisc<Lite5h4dow> that seems wrong
19:55:13GitDisc<Lite5h4dow> have i got an old version?
19:55:30*nsf joined #nim
19:55:35PMunchI have 0.8.8 as well
19:55:39PMunchAnd it works fine for me
19:55:43GitDisc<Lite5h4dow> 0.0
19:55:52PMunchWait, are you doing "nimble install wxnim"?
19:56:05PMunchOr cloning my repo and doing "nimble install" in the base folder?
19:56:06GitDisc<Lite5h4dow> i cloned it and typed `nimble install wxnim.nimble`
19:56:21FromGitter<zacharycarter> just type nimble install
19:56:23FromGitter<zacharycarter> in the root
19:56:26GitDisc<Lite5h4dow> oh ok
19:56:42GitDisc<Lite5h4dow> oooooooooooooooh
19:56:43GitDisc<Lite5h4dow> ok
19:56:50GitDisc<Lite5h4dow> it installed
19:56:56GitDisc<Lite5h4dow> im just being dumb again
19:56:57FromGitter<zacharycarter> \o/
19:57:03PMunchHaha
19:57:26PMunchThe nim.cfg in the examples/genuimacro folder has a slight mistake (which I've fixed now)
19:57:32GitDisc<Lite5h4dow> ok anything else i should do?
19:57:39GitDisc<Lite5h4dow> og ok
19:57:50GitDisc<Lite5h4dow> oh ok
19:57:56PMunchIf 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:09PMunchIf you have installed wxnim from you package manager of course
19:58:47*jxv quit (Quit: zzz…)
19:58:52GitDisc<Lite5h4dow> well, i installed it via cloning
19:59:08GitDisc<Lite5h4dow> because i couldnt install it via `nimble install wxnim`
19:59:14GitDisc<Lite5h4dow> it said it didnt exist
19:59:52*jxv joined #nim
20:00:11*el_tejon quit (Quit: el_tejon)
20:00:25PMunchYeah, Araq made the original version. I cloned it and added the genui macro
20:00:44GitDisc<Lite5h4dow> who is this Araq guy
20:00:47PMunchAnd I think Araqs version used to be in Nimble so I couldn't add mine
20:00:49GitDisc<Lite5h4dow> he seems rather hostile
20:00:56PMunchHe is the guy who made Nim :P
20:01:00GitDisc<Lite5h4dow> o.o
20:01:06GitDisc<Lite5h4dow> really?!
20:01:08PMunchHe's not hostile, but he might seem a tad harsh from time to time :P
20:01:10PMunchYeah
20:01:24PMunchI think he's just fed up with silly questions sometimes
20:01:38GitDisc<Lite5h4dow> well, he called me an idiot for installing nim to programfiles instead of a different folder...
20:01:59PMunchHaha :P
20:02:08GitDisc<Lite5h4dow> yeah
20:02:10PMunchWhere did he want you to install it?
20:02:17GitDisc<Lite5h4dow> he didnt say
20:02:19federico3Lite5h4dow: don't take it personally
20:02:25GitDisc<Lite5h4dow> he just called me a troll and told me to leave
20:02:28PMunchI haven't used Windows in ages so I have no idea where I'd put it
20:02:41dxgmaybe he was calling you an idiot for using nim on windows(im not)
20:02:46PMunchWell that's a bit harsh
20:03:01dxgim kidding, its just hell to try to get working
20:03:04PMunchdxg, well Araq himself is on Windows so I don't think that's the issue :P
20:03:06GitDisc<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:08federico3Lite5h4dow: there's a troll that joins the channel just to annoy people
20:03:17PMunchWell now he's over on a Mac I think
20:03:38PMunchYeah, we've had some issues with trolls
20:03:44GitDisc<Lite5h4dow> ah ok
20:03:47GitDisc<Lite5h4dow> well thats fine
20:03:57dxgI swear to god im not one
20:04:03GitDisc<Lite5h4dow> ditto
20:04:10GitDisc<Lite5h4dow> im just new to Nim
20:04:15GitDisc<Lite5h4dow> i love the language
20:04:16dxg^same
20:04:32PMunchThat's good, always nice to have new people interested in the language :)
20:04:57federico3Lite5h4dow: the troll changes nickname often - hence people get edgy sometimes
20:04:58GitDisc<Lite5h4dow> its like the best of all the languages ive ever tried
20:05:07dxgI 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:08dxgso
20:05:26GitDisc<Lite5h4dow> its nice, neat, and so easy to understand at a glance (if you understand whats going on)
20:05:26PMunchgcc3?
20:05:42FromGitter<zacharycarter> just don't use C++ features
20:05:48dxgI 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:02FromGitter<zacharycarter> I wouldn't do that
20:06:05dxgcmath was what broke it
20:06:09dxgI'm not going to
20:06:12PMunchHaha, good luck to your TA's trying to look through your code :P
20:06:16FromGitter<zacharycarter> the C produced by Nim is not very readable
20:06:17GitDisc<Lite5h4dow> xD
20:06:44dxgPMunch: I think if he went through my code at all I wouldn't have gotten a zero for it not compiling
20:06:51dmi0hello 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:52dxgso I think I'd be safe there
20:07:03FromGitter<zacharycarter> what is the issue dmi0?
20:07:39GitDisc<Lite5h4dow> right well Pmunch, is there anything i should do before i get my feet wet with your library?
20:08:06PMunchWell, 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:06dxgFromGitter: I know its not readable I've looked at it before, and I thought it would be kind of funny
20:08:07FromGitterdxg, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
20:08:22dxgwoops
20:08:24PMunchLite5h4dow, maybe have a look at the control-gallery example?
20:08:37GitDisc<Lite5h4dow> ok cool
20:08:39PMunchOr the thread example if you want something with a bit more actual work
20:09:04GitDisc<Lite5h4dow> ill examine both and see if i can create some stuff
20:09:14*MJCaley quit (Quit: MJCaley)
20:09:16GitDisc<Lite5h4dow> if i get stuck should i message you on here?
20:09:20PMunchSure
20:09:37GitDisc<Lite5h4dow> ty,ty
20:10:02*el_tejon joined #nim
20:10:04GitDisc<Lite5h4dow> right well if you dont hear from me again tonight enjoy your day / night
20:10:24dmi0@FromGitter, in my karax test i get: clientPostRenderCallback_84944 is not a function, just tried the documentation and it works.
20:10:24FromGitterdmi0, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
20:10:35PMunchYou can also have a look at this: http://zetcode.com/gui/wxwidgets/firstprograms/ for some WxWidgets specific stuff
20:11:06GitDisc<Lite5h4dow> sweet
20:12:08dmi0@zacharycarter, in my karax test i get: clientPostRenderCallback_84944 is not a function, just tried the documentation and it works.
20:12:10dxgPMunch: 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:33PMunchYeah that sucks :P
20:12:41dxganyway, 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:33FromGitter<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:11PMunchdxg, don't worry about it. When there aren't anyone asking Nim questions this channel can get pretty off-topic :P
20:15:24dmi0yeah, 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:25PMunchAs 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:40PMunchdmi0, hmm that really doesn't sound good
20:15:44PMunchAnd it's only in FF?
20:16:34dmi0as far as I can tell, yes, I mean I just tested in chrome and it works fine.
20:18:07FromGitter<mratsim> no it’s still a warning
20:18:28FromGitter<mratsim> oops Gitter not being refreshed, was talking about the package structure
20:19:32PMunchdmi0, and you said this was happening for the search in the official docs as well?
20:19:59dmi0@PMunch, yes
20:20:13PMunchHow do you replicate?
20:20:33GitDisc<Lite5h4dow> oh, PMunch, i did have one last questio that i almost forgot to ask...
20:20:42GitDisc<Lite5h4dow> making a CSS theme for it
20:21:09GitDisc<Lite5h4dow> i dont see anything about it on your git
20:21:24PMunchLit5h4dow, yeah WxWidgets doesn't have a way to set themes
20:21:32GitDisc<Lite5h4dow> ah, rip
20:21:40PMunchBut on Linux it will use your Gtk theme
20:21:53GitDisc<Lite5h4dow> ok, good enough for now
20:22:08dmi0@PMunch, open FF 58.0.2, search something using the search input box, then try to make another search
20:23:09PMunchHmm, it works fine here
20:23:16dmi0@zacharycarter, is this issue related to some change in karax, did the API changed ?
20:23:20PMunchFF 58.0.2 64-bit on Linux
20:23:37PMunchdmi0, link to the page you're having issues with?
20:25:59GitDisc<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:28dmi0@PMunch, https://nim-lang.org/docs/system.html
20:26:49ArrrrWhat is the nim equivalent of this https://github.com/dgryski/go-perfbook ?
20:26:50PMunchLite5h4dow, Gtk3 is definitely easier to theme
20:27:06PMunchYou can just tell it to load a CSS theme from within the code
20:27:12GitDisc<Lite5h4dow> what about windows preformance?
20:27:12PMunchAnd it will override the Linux theme
20:27:14dmi0PMunch, what version of FF are you using?
20:27:53PMunchPerformance 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:11PMunchdmi0, 58.0.2 64-bit Linux
20:28:13GitDisc<Lite5h4dow> alright, i dont have a problem with that
20:28:18GitDisc<Lite5h4dow> atom packages electron
20:28:21GitDisc<Lite5h4dow> so i guess its ok
20:28:42PMunchYeah, not so good for disk-space. But that's rarely a problem nowadays
20:28:52GitDisc<Lite5h4dow> yeah
20:29:09GitDisc<Lite5h4dow> would you recommend GTK or wx for what i want to do?
20:29:23PMunchdmi0, ah. On that page I also get errors
20:29:57PMunchhttps://nim-lang.org/docs/lib.html
20:30:01PMunchThat works fine with search
20:30:07PMunchBut I do get another not defined error
20:31:25GitDisc<Lite5h4dow> for a text editor i mean
20:31:49Yardanicoraw win32 api :)
20:31:59Yardanicoif you want less size, more performance
20:32:00PMunchWell, I'd say Gtk3 might be easier to work with..
20:32:08Yardanicobut code will be uglier and harder to write
20:32:09PMunchYardanico, but then it won't run on Linux..
20:32:18GitDisc<Lite5h4dow> alrighty
20:32:19PMunchAnd you can't use genui :)
20:32:24YardanicoPMunch, well, there's wine and IDK which platform Lite wants to use
20:32:34Yardanicoyou can run DX11 games in wine nowadays
20:32:38GitDisc<Lite5h4dow> im on windows and linux
20:32:52GitDisc<Lite5h4dow> i have bot linux and windows machines
20:32:59GitDisc<Lite5h4dow> and want t omake a text editor for both
20:33:04GitDisc<Lite5h4dow> specifically for nim
20:33:06Yardanicowell I have linux and windows, but on one machine :)
20:33:06dmi0PMunch, it is the second attempt that fails
20:33:09PMunchYardanico, well yeah. You could run it on Linux. But saying that Wine makes win32 cross-platform isn't really correct :P
20:33:22dmi0no matter te page
20:33:30PMunchdmi0, on the one I linked as well?
20:33:37dom96Anybody familiar with the usage of Nim's endians module?
20:33:38PMunchI can search as much as I'd like on that one
20:34:03*jxv quit (Quit: zzz…)
20:34:20dmi0ok, but follow whatever link it presents
20:34:39dmi0and then search again
20:35:36PMunchWell, 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:36Yardanicodom96, well, AFAIK you just give it a pointer and it gives you another pointer
20:40:02FromGitter<mratsim> @dom96, I’m an endian magician :P
20:40:46FromGitter<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:12FromGitter<mratsim> Basically it’s used like “shallowCopy"
20:41:20*dmi0_ is now known as dmi0
20:42:49GitDisc<Lite5h4dow> why in hell doesnt gtk just have an installer
20:43:37GitDisc<Lite5h4dow> for windows i mean
20:43:39PMunchIt does, doesn't it?
20:43:54GitDisc<Lite5h4dow> no, its telling me to download a package manager
20:44:00GitDisc<Lite5h4dow> and install it like that for windows
20:44:02GitDisc<Lite5h4dow> http://www.msys2.org/
20:44:03GitDisc<Lite5h4dow> that
20:44:11GitDisc<Lite5h4dow> https://www.gtk.org/download/windows.php
20:44:14GitDisc<Lite5h4dow> thats the page
20:44:20GitDisc<Lite5h4dow> unless im looking at the wrong thing
20:44:33Yardanico"Note: These instructions are intended for developers wanting to develop applications based on GTK+, not for end-users."
20:44:45dom96Hrm, why is copying bytes into a struct so damn difficult
20:45:03Yardanicodom96, are you parsing some binary stuff?
20:45:08dom96yeah
20:45:21Yardanicodom96, IDK if it can be used in your case, but try - https://github.com/xomachine/NESM
20:45:27GitDisc<Lite5h4dow> @yarndaco thats exactly what im doing isnt it?
20:45:30PMunchdom96, Might I recommend https://github.com/PMunch/binaryparse
20:45:48GitDisc<Lite5h4dow> im making a program that uses the GTK3 library
20:46:02YardanicoWell, then what's your problem?
20:46:03PMunchLite5h4dow, hmm yeah that looks right. But I distinctly remember there being a Gtk3 Windows installer
20:46:05YardanicoJust follow the instructions
20:46:22GitDisc<Lite5h4dow> hmm ok
20:46:26Yardanicoand really, developing gtk apps is easier on linux :)
20:46:48GitDisc<Lite5h4dow> but i want to make sure it works on linux too, and have a theeming system
20:47:04GitDisc<Lite5h4dow> and since GTK is the only one with an available library for nim
20:47:13GitDisc<Lite5h4dow> (that i can understand) thanks to pmunch
20:47:21dom96PMunch: Could use some more examples
20:47:31PMunchdom96, yeah. Sorry about that :P
20:47:42dom96I feel like it's a bit overkill for my use case though
20:47:58dom96I have a struct, I know the data is in little endian, I just want to convert the data into that struct.
20:48:05FromGitter<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:20PMunchdom96, did you see this though: https://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L622
20:48:35FromGitter<mratsim> This is what you need: https://github.com/mratsim/Arraymancer/blob/cffa052a44d95cf231e1a2100dd9d5bf9bb9b36e/src/datasets/mnist.nim#L55-L57
20:48:41dom96PMunch: yep, that's why I said "more examples" :P
20:48:55PMunchHaha, okay. Yeah it could do with some more examples
20:49:01PMunchAnd proper documentation
20:49:05dom96mratsim: yeah, I'm trying that. For some reason it's not working.
20:49:30PMunchI 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:46dom96I've got a cstring though
20:49:52dom96Maybe I'm missing something
20:49:58FromGitter<mratsim> maybe you need to dereference?
20:49:59*el_tejon quit (Quit: el_tejon)
20:50:15dom96I can cast the cstring to a `ptr MyStruct` and that works fine
20:50:17FromGitter<mratsim> or take a ptr of the struct
20:50:22dom96But I have feeling that's not the right way to do it :)
20:52:44*jxv joined #nim
20:52:52dom96okay, so 'addr cstring' was wrong
20:53:00dom96damn 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:11PMunchSlow 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:12dmi0_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:34dom96oh, 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:15FromGitter<mratsim> lol
22:52:04FromGitter<mratsim> nice one dom96 :P
22:53:08dom96I 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)