<< 23-12-2018 >>

00:07:58*vlad1777d quit (Ping timeout: 250 seconds)
00:38:53*theelous3 joined #nim
00:42:29*deansher_ joined #nim
00:46:04*deansher_ quit (Client Quit)
00:48:37*Sentreen joined #nim
00:53:23*theelous3 quit (Ping timeout: 245 seconds)
01:17:23*wildlander quit (Quit: Konversation terminated!)
01:26:09*zachk quit (Quit: Leaving)
01:47:40*leorize joined #nim
02:57:19*Tyresc quit (Quit: WeeChat 2.4-dev)
03:00:03*banc quit (Quit: Bye)
03:17:03*banc joined #nim
03:17:58*abm quit (Quit: Leaving)
04:20:05*nsf joined #nim
04:40:42*steshaw joined #nim
05:21:45*kapil____ quit (Quit: Connection closed for inactivity)
05:31:18*shashlick quit (Remote host closed the connection)
05:31:38*shashlick joined #nim
05:33:22FromDiscord_<AregevDev> Hi
05:34:05shashlickwhat's up
05:34:58FromDiscord_<AregevDev> Is this Discord dead?
05:35:17FromDiscord_<AregevDev> Should I switch to Gitter?
05:38:04shashlickyou are bridged into gitter and irc
06:17:09*kinkinkijkin quit (Remote host closed the connection)
06:17:34*kinkinkijkin joined #nim
06:47:57*d10n-work quit (Ping timeout: 252 seconds)
06:50:54*d10n-work joined #nim
07:06:48*plushie quit (Quit: plushie)
07:28:23*dddddd quit (Remote host closed the connection)
08:07:26FromGitter<xmonader> https://pastebin.com/J2QjEbw6 hi i tried to support nim here ⏎ https://github.com/BenBrock/reple it's kinda working
08:20:38*kapil____ joined #nim
09:42:18*vlad1777d joined #nim
09:42:49*Vladar joined #nim
10:00:18*steshaw quit (Quit: Connection closed for inactivity)
10:02:20*stefanos82 joined #nim
10:41:46*tdc quit (Quit: Leaving)
11:08:03*nsf quit (Quit: WeeChat 2.3)
11:24:10*xet7 joined #nim
11:33:20*OrganicAnywhere joined #nim
11:54:42*dddddd joined #nim
12:03:35FromGitter<zacharycarter> @xmonader - isn't this basically what iNim is?
12:04:03FromGitter<zacharycarter> either way - cool :)
12:25:35*nsf joined #nim
13:11:49FromGitter<xmonader> @zacharycarter yeah indeed, just sounded easy to do with some json config :)
13:13:22*PrimHelios quit (Remote host closed the connection)
13:15:37FromGitter<mratsim> @dom96 @c-blake This was merged too fast: https://github.com/nim-lang/Nim/pull/10072
13:16:04*enthus1ast quit (Quit: WeeChat 1.6)
13:17:23dom96Okay, elaborate
13:19:07*OrganicAnywhere quit (Quit: See you in hell, madafaka~)
13:19:17FromGitter<mratsim> opening an issue
13:25:47*whaletechno quit (Quit: ha det bra)
13:25:52FromGitter<deech> These PRs seem like they can be merged. I addressed the comments. https://github.com/nim-lang/Nim/pull/10001 https://github.com/nim-lang/Nim/pull/9934
14:06:19*filcuc joined #nim
14:06:53filcucshould i fill a bug report for "if expressions" not compiling with operators
14:06:54filcuc?
14:07:18filcuctemp &= if true: "foo" else: "bar"
14:07:22filcucwhere temp is string
14:08:06FromGitter<alehander42> does it work with (if true: ..) ?
14:09:41filcucis it work with ()
14:09:43filcucyes
14:10:21*noonien quit (Quit: Connection closed for inactivity)
14:10:28FromGitter<alehander42> hm
14:36:47*xet7 quit (Quit: Leaving)
15:11:34*kapil____ quit (Quit: Connection closed for inactivity)
15:27:29*filcuc quit (Quit: Konversation terminated!)
15:40:20*nsf quit (Quit: WeeChat 2.3)
16:26:22*smitop joined #nim
16:30:18*Subspice joined #nim
16:35:24FromGitter<mratsim> I think this is a parsing issue
16:35:43FromGitter<mratsim> I remember with “block:” you have to wrap then in double parenthesis in the past
16:53:56*azur_kind joined #nim
16:58:11*nsf joined #nim
16:59:56SubspiceWhat does it mean when I run a program successfully but get the message "[Done] exited with code=null in X seconds"?
17:02:52*Subspice quit (Quit: See you in hell, madafaka~)
17:09:31*Tyresc joined #nim
17:09:36*Vladar quit (Remote host closed the connection)
17:17:21crashbjornI can't seem to find any documentation on the lambda syntax provided with the futures module - is there none available?
17:18:35*kapil____ joined #nim
17:20:16leorizedoesn't that module document the syntax itself?
17:21:10crashbjornwhere should i be looking for this? in the source code?
17:21:24crashbjornI'm sorry if this is a dumb question :) just haven
17:21:37crashbjorn*...havent been able to find anything with my google-fu
17:21:39leorizein the module reference :P
17:22:00leorizehttps://nim-lang.org/docs/sugar.html
17:22:40leorize^ `futures` is now named `sugar`
17:22:45crashbjornperfect! thank you :)
17:25:57*azur_kind quit (Remote host closed the connection)
17:32:33*wildlander joined #nim
17:35:51*mal`` quit (Ping timeout: 252 seconds)
17:55:51shashlickNice when @xmonader - https://github.com/BenBrock/reple/pull/2
17:55:54shashlickWork
17:57:08*fthe joined #nim
18:00:37fthehi. Know how in java/python, the default `hash()` of an object is its memory address? Is there a way to get similar behavior in nim? Or to check if two ref vars point to the same value?
18:02:16leorize`==` :)
18:02:30*OrganicAnywhere joined #nim
18:03:56ftheleorize: I though I read in the manual that ==, for ref types, actually does a deep comparison of fields?
18:06:37leorize!eval echo new(RootObj) == new(RootObj)
18:06:41NimBotfalse
18:06:52leorizefthe: ^ doesn't look like that
18:07:57fthehm, interesting, thanks'
18:09:33fthehttps://github.com/nim-lang/Nim/blob/master/lib/system.nim#L388 confirms this
18:10:52ftheThe deep-compare thing is for non-ref object types I see
18:11:36fthe!eval new(RootObj)[] == new(RootObj)[]
18:11:38NimBotCompile failed: in.nim(1, 16) Error: expression 'new(RootObj)[] == new(RootObj)[]' is of type 'bool' and has to be discarded
18:11:56fthe!eval echo new(RootObj)[] == new(RootObj)[]
18:11:59NimBottrue
18:13:00*OrganicAnywhere quit (Read error: Connection reset by peer)
18:13:14*OrganicAnywhere joined #nim
18:13:14ftheso, is there a way to use this `==` behavior for refs as a hash for tables or sets?
18:13:22*OrganicAnywhere left #nim (#nim)
18:14:48ftheI see the hashes modules has `hash` for pointer, so maybe one could use `addr(obj[]).hash()`?
18:17:10leorizenot the best thing to do, but sure, it works I think
18:23:30ftheyeah, that's my thoughts, was wondering if there was a better/idiomatic way
18:24:14leorizeI think people don't usually use `ref` as table key
18:25:05leorizeit can be risky since you could leak the pointer with the `pairs` iterator
18:36:31*nsf quit (Quit: WeeChat 2.3)
18:41:19*azur_kind joined #nim
18:42:59*jacereda joined #nim
18:46:02*smitop quit (Quit: Connection closed for inactivity)
18:46:42jaceredaWhat's the C backend supposed to generate? c99?
18:47:53leorizeit generates whatever the compiler understands
18:48:23leorizeif you use compiler=gcc, the compiler will generate gcc tailored code
18:48:39FromGitter<timotheecour> how can `(buf, exitCode) = execCmdEx("./megatest”)` work on windows?
18:49:06leorizedoes it not work or something?
18:49:55FromGitter<timotheecour> haven’t noticed any failure, but doesn't windows use `.exe` extension?
18:49:59jaceredaI guess https://github.com/nim-lang/Nim/commit/2fd522cf58e40064747e52e0eeb53f28e67d3243 will break some compilers, anonymous struct unions aren't very standard
18:50:00jacereda
18:50:08jaceredaI think it's c11
18:50:24leorizeit generates whatever the backend compiler understands
18:50:34leorizeif the backend is gcc, it generates gcc-specific code
18:50:58leorizeat least that's what I remember :P
18:51:13jaceredaleorize: I don't think that commit is gcc-specific
18:51:59*mal`` joined #nim
18:52:03jaceredaalso, anonymous structs will make implementing https://github.com/nim-lang/Nim/issues/3629 quite hard
18:53:03Araqjacereda: I tried visual C++ and it supports it. all other compilers are usually more C99-friendly
18:53:29FromGitter<timotheecour> @araq : how can `(buf, exitCode) = execCmdEx("./megatest”)` work on windows? doesn’t it require .exe ?
18:54:02jaceredaAraq: c99 didn't allow anonymous structs, I think it's c11
18:54:16jaceredaif c99 compilers are ruled out I guess it's ok
18:54:16leorizetimotheecour: `execCmdEx` use `cmd` to execute commands
18:54:30jaceredabut the other problem is what really worries me
18:54:39Araqjacereda: interesting I simply assumed structs and unions are treated consistently
18:55:10Araqtimotheecour: usually the Win API deals with these things
18:56:01jaceredaAraq: with named struct unions, having fields with the same name in different branch is ok, but that's not the case when the fields are anonymous
18:56:07FromGitter<timotheecour> ok
18:57:13Araqand why would https://github.com/nim-lang/Nim/issues/3629 be hard? some field names will be mangled then if we implement it
19:00:12FromGitter<mratsim> @fthe, just cast the ref to `Hash`
19:00:58jaceredabecause mangling will be necessary
19:01:14jaceredait will be a bit more confusing when examining the generated code (field names won't be the same)
19:01:30Araqit already is, in C 'far' is a keyword and in Nim it isn't
19:03:21Araqand strictly speaking, generating C is impossible (what a great "portable assembler", give me a break, it's a bad joke) because it's impossible to know what has been #define'd and the preprocessor doesn't know C's scoping rules
19:09:02jaceredaso, if I attempt to implement #3629 backing out that commit, chances are it won't be accepted?
19:10:27*fthe quit (Ping timeout: 240 seconds)
19:11:35*plushie joined #nim
19:14:15stefanos82Araq: sounds like a good Nim project for you; a genuinely portable assembler implemented in Nim ;)p
19:14:58Araqstefanos82: LLVM already exists though ;-)
19:15:02jaceredastefanos82: there're lots of decent solutions around
19:15:21stefanos82Araq: touché
19:16:49stefanos82jacereda: don't interrupt my teasing please. Araq is a grumpy "old" man that likes to moan about everything...except a good beer
19:17:37Araqjacereda: PRs are always welcome. Ideally they don't reintroduce old cruft though.
19:18:58Araqstefanos82: I try to keep my moaning to stuff that's not as widely known to be deeply flawed.
19:19:26stefanos82Araq: you know I rarely disagree with you, don't you that already mate?
19:19:49Araqwhich is why I rarely bash Windows, everybody already knows it's crap.
19:20:03stefanos82I personally call them WinBlows
19:20:03Araqstefanos82: yeah I know but others might read this too.
19:20:09stefanos82because literally it blows everything
19:20:33stefanos82someone uploaded a picture *of a coffee maker* updating its Windows 10
19:20:42stefanos82ON A FREAKING COFFEE MACHINE!
19:20:46stefanos82bloody hell man
19:20:51FromGitter<zacharycarter> our coffee machines at work run android
19:21:01stefanos82for FAQ's sake man
19:21:09FromGitter<alehander42> jacereda: we discussed https://github.com/nim-lang/Nim/issues/3629 a lot weeks ago, but it was somewhere in the chat
19:21:20jaceredaAraq: generating something like this would be acceptable? https://gist.github.com/jacereda/716a4a2cc1840f3ce30d0393c6179b3a
19:21:56stefanos82it wouldn't work with C
19:21:58jaceredanow, the branch identifiers are missing and avoiding those would mean introducing some mangling to the field names... that feels odd
19:22:04stefanos82it does not support anonymous structs
19:22:12stefanos82at least not until C11 if I'm not mistaken
19:22:39FromGitter<zacharycarter> stefanos82: should read up a bit
19:23:00Araqjacereda: if you put it behind a conditional
19:23:18Araqsee extccomp.TInfoCCProp
19:23:28stefanos82@zacharycarter: shoot, i didn't see that line
19:23:30Araqa new flag should be used for this
19:23:34stefanos82apologies jacereda
19:24:47jaceredaAraq: but a flag would imply implementing both approaches... or do you mean a flag to enable repeated field names?
19:25:19Araqthe flag generates the struct names or not
19:25:45jaceredaand what is it supposed to do when you don't pass the flag to generate struct names and have repeated field names?
19:27:09Araqwell you conflate two separate issues
19:27:25Araq1. C compiler doesn't support anon structs. Covered by the flag.
19:28:00jaceredathat's the part I don't care about that much
19:28:01Araq2. Can't use anon structs because identifiers would clash. Compiler would always generate struct names then to disambiguate. Or it would mangle the names.
19:28:34AraqI don't care which of these two you do
19:29:31FromGitter<Clyybber> Araq: You would like to remove static T?
19:29:44Araqhell yes
19:29:53jaceredathat's the part that I'm interested in and I would be willing to implement it, but I don't want to implement 2 separate approaches
19:30:08Araqwell obviously you implement what's easier :P
19:30:20FromGitter<Clyybber> Araq: So no more compile time arguments for a proc?
19:30:46FromGitter<Clyybber> Only if the proc is {.compiletime.} ?
19:36:22Araquse a macro
19:36:29Araqor template
19:37:27FromGitter<Clyybber> What purpose does the {.compiletime.} pragma have?
19:37:43*Trustable joined #nim
19:37:44FromGitter<Clyybber> Templates should be capable of the same stuff don't they?
19:42:53FromGitter<Clyybber> @timotheecour I see you just opened a issue for removing static T
19:44:18FromGitter<Clyybber> Araq: Do you have an Idea how the problem in https://github.com/nim-lang/Nim/issues/10085 would be solved without static T?
19:57:02*azur_kind quit (Ping timeout: 250 seconds)
20:00:12*stefanos82 quit (Remote host closed the connection)
20:12:36*onionhammer quit (Quit: WeeChat 1.9.1)
20:12:53*onionhammer joined #nim
20:15:10*jjido joined #nim
20:33:18FromGitter<deech> If the following is equivalent to `proc foo(...) {.compileTime.} = ` I suggest removing the `{.compileTime.}` pragma as well: ⏎ ⏎ ```static: ⏎ proc foo(..) = ...``` [https://gitter.im/nim-lang/Nim?at=5c1ff10d2863d8612b7bc7ca]
20:38:42FromGitter<mratsim> no, I need either the static result or the compile-time pragma
20:39:22FromGitter<deech> In what cases is one better than the other?
20:40:31FromGitter<mratsim> there is work to merge them and remove one of them
20:40:47FromGitter<deech> Oh, had no idea. Sorry.
20:44:02*kungtotte joined #nim
20:46:47*jacereda quit (Ping timeout: 240 seconds)
20:47:42*nsf joined #nim
20:49:06*jacereda joined #nim
20:52:48FromGitter<mratsim> you can read up here: https://github.com/nim-lang/Nim/pull/9686
20:57:00*filcuc joined #nim
20:57:26filcucwhat's the correct way to use nimsuggest con command?
21:00:05*Trustable quit (Remote host closed the connection)
21:00:13filcuci'm testing it with --tester but i get EOF
21:01:47*jacereda quit (Ping timeout: 240 seconds)
21:02:58*Trustable joined #nim
21:06:13FromGitter<mratsim> After cooking for seven months, I’m proud to release the latest v0.5 release of Arraymancer: https://github.com/mratsim/Arraymancer/releases/tag/v0.5.0 ⏎ ⏎ Special highlights: Featuring recurrent neural networks in sequence/timeseries classification and text generation with examples in Shakespeare and Jane Austen (Pride & Prejudice) style
21:09:31jjidoWhere are the examples?
21:16:57*Trustable quit (Remote host closed the connection)
21:18:11*Trustable joined #nim
21:18:13*Trustable quit (Remote host closed the connection)
21:18:18FromGitter<mratsim> https://github.com/mratsim/Arraymancer/tree/master/examples
21:19:15*fthe joined #nim
21:23:12FromGitter<alehander42> congrat!!
21:26:31Araqmratsim: When I am talking about removing static T this doesn't mean that your libs become impossible to write.
21:27:53*jacereda joined #nim
21:28:43FromGitter<mratsim> i hope so
21:28:55FromGitter<mratsim> I really like the static enums
21:29:03filcuchttps://github.com/nim-lang/Nim/issues/10087
21:32:43dom96mratsim: Awesome, is this the input or the output: https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_pride_and_prejudice.txt ?
21:35:21FromGitter<mratsim> the input
21:35:48FromGitter<mratsim> output is here: https://github.com/mratsim/Arraymancer/blob/ebb3f8325ed2af61398bb946657ad093b5dba386/examples/ex06_shakespeare_generator.nim#L644-L811
21:36:37FromGitter<mratsim> we can train it on Nim code as well ;)
21:37:06Araqyay, can we get an even better tabnine?
21:38:15FromGitter<mratsim> I don’t think so :P
21:39:01dom96You should train it on Nim IRC logs and integrate it into NimBot ;)
21:39:13FromGitter<mratsim> lol
21:39:33FromGitter<mratsim> “FromGitter"
21:39:39FromGitter<mratsim> in every sentence
21:40:21dom96nah, but it might include random nicknames in replies
21:41:02FromGitter<mratsim> I’ve also started on reinforcement learning on Atari games though I need a new machine because my GPU is on a headless server - https://github.com/numforge/agent-smith
21:41:14FromGitter<mratsim> I plan to add Starcraft 2 bindings
21:51:32*OrganicAnywhere joined #nim
21:51:49OrganicAnywhereHi everyone. I'm thinking of reading this <http://maplant.com/gc.html> and implement the code in Nim. An exercise in working with pointers and memory (stacks, heap). Good idea?
21:53:04FromGitter<mratsim> I think it’s a great idea
21:53:07*jacereda quit (Ping timeout: 240 seconds)
21:55:37FromGitter<mratsim> The GC_init proc will only work on Unix though as it calls: /proc/self/stat I hope you’re not on windows
21:55:48AraqOrganicAnywhere: ok but notice that this exists in gc_ms.nim
21:56:38Araqand mark&sweep is a terrible algorithm ;-)
21:57:32OrganicAnywhereAraq: Pretty sure nim's gc is much, much better. The point of this would be just to get a bit better at progamming (I'm not new to it, but never really got past the early stages).
21:59:27crashbjornUncalled-for-recommendation: but I was really glad that I did the advent of code challenges to improve my programming skills. They mostly focus on algorithms, but they're a great way to get backbone experience, and to get to know a language really well.
21:59:42crashbjorn@OrganicAnywhere
21:59:50OrganicAnywhereOther ideas for exercises I have are implementing some efficient algorithm for multiplying large matrices, implementing a hash table, or writing that Brainfuck interpreter that's on the nim-lang.org website.
22:00:21FromGitter<mratsim> GC sounds fine
22:00:27OrganicAnywherecrashbjorn: I'm doing AoC 2015! I started a few days ago and I'm on day 4 now. I took a break today to write Conway's Game of Life.
22:00:38FromGitter<mratsim> Multiplying large matrices is a pain. I did that twice ;)
22:00:52FromGitter<mratsim> Brainfuck is quite fun.
22:01:01FromGitter<mratsim> Never did a hash table.
22:01:02crashbjornAwesome! Sounds like you're being really productive OrganicAnywhere :D
22:01:45AraqOrganicAnywhere: I have an alternative for you
22:02:34FromGitter<mratsim> For Brainfuck and VM here is my experimental code: https://github.com/mratsim/jitterland
22:03:15FromGitter<mratsim> For matrix multiplication, everything you need is here: https://github.com/numforge/laser/blob/master/research/matrix_multiplication_optimisation_resources.md
22:03:28FromGitter<mratsim> (I reach OpenBLAS performance)
22:03:42OrganicAnywherecrashbjorn: Long story short: I decided to not pick up C againa and give Nim a go, and I've never been this excited about programming. I'm actually looking forward to writing things I used to think sounded really boring.
22:03:56OrganicAnywhereFromGitter: Thank you!
22:03:57FromGitterOrganicAnywhere, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
22:04:01OrganicAnywhereOh
22:04:07OrganicAnywherehaha
22:04:35OrganicAnywhereAraq: What's your alternative?
22:04:37Araqhttp://arctrix.com/nas/python/gc/ implement this cycle collector algorithm
22:04:53OrganicAnywhereOhhh
22:04:58Araqor alternatively the more traditional variant of "trial deletion"
22:05:30FromGitter<mratsim> ah actually my matrix multiplication optimization resources are missing the first steps, they are here: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm_tiling.nim#L12-L30, I encourage you to start with this step by step tutorial - http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/index.html
22:05:42*fthe quit (Ping timeout: 246 seconds)
22:06:13Araquse a BTree (compiler/btree.nim) to attach more data to a 'ref'
22:06:49OrganicAnywhereOh, right. So I've never really worked with algorithms and data structures like that.
22:07:17OrganicAnywhereBut that's on my list of things to do parallel to AoC
22:07:34Araqstay in "user land" as long as possible, that's what I do too when I play with new GC algorithms
22:07:55OrganicAnywherewhat's "user land"?
22:08:26Araqdon't touch system.nim or gc.nim, write a Nim program that uses an array or a seq as the heap
22:08:51Araqand when you're sure the algorithm does it properly port it to a lower level
22:09:25OrganicAnywhereSounds good. I'm not particularly interested in GC's, but it sounded like an interesting way to exercise working with pointers and stacks and heaps.
22:10:46OrganicAnywheremratsim: So I should do the links you sent in reverse order?
22:11:02Araqit's a minefield and when you start in the lower level you'll never get anything done
22:11:53Araqand these algorithms all tend to be underspecified, leaving out important edge cases or even buggy
22:11:55OrganicAnywheremratsim: Wait, that last like is about implementing a kernel...?
22:13:38OrganicAnywhereAraq: What kind of exercise or small project would you recommend if one wanted to actually become more familiar with the heap?
22:13:43FromGitter<mratsim> kernel is a unit of computation in high performance computing
22:14:00OrganicAnywheremratsim: Ahh, ok! :)
22:14:37FromGitter<mratsim> for efficient matrix multiplication you do what we call `tiling` or `blocking` to reuse data in CPU cache
22:15:02FromGitter<mratsim> a simple scheme is to do matrix multiplication by splitting matrices into 32 by 32 block
22:16:10filcucAraq: not asking to fix it but do you think that https://github.com/nim-lang/Nim/issues/10087 is a valid bug report? or is it correct behaviour of the con command?
22:16:12FromGitter<mratsim> To see how blocking works live, I suggest you try your hand at fast transposition first
22:16:44OrganicAnywheremratsim: Do you mean looking into algorithms to do fast transpositions fast in code?
22:16:49FromGitter<mratsim> This is an example of transposition with blocking: https://github.com/numforge/laser/blob/master/benchmarks/transpose/transpose_bench.nim#L187-L192
22:17:07OrganicAnywhereWhy not. Matrix theory is fun.
22:17:14FromGitter<mratsim> This improves speed 2x compared to naive transposition
22:17:54FromGitter<brentp> I am using a stream to read binary data from a zip file. I currently extract the file to disk and the read the binary data as such: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ how would I do this without the temp file? [https://gitter.im/nim-lang/Nim?at=5c2009926649aa1f82beae87]
22:18:00FromGitter<mratsim> And here is an example of 2D tiling for matrix multiplication: https://github.com/numforge/laser/blob/master/benchmarks/gemm/gemm_bench_float32.nim#L110-L127
22:18:15FromGitter<mratsim> this should be much faster (but still very slow) compared to triple for loops.
22:18:55FromGitter<mratsim> @brentp I think `zip` package offers ZipStream no?
22:19:21OrganicAnywheremratsim: You're into this stuff. Is it something you do just out of interest or do you use this stuff in your work or projects?
22:19:26FromGitter<brentp> @mratsim congrats on the release. that's pretty impressive you got to BLAS speed. At some point, I'll have to see if I can use laser to parallelize some of my stuff.
22:19:55Araqfilcuc: the bug report seems fine
22:20:12FromGitter<mratsim> I’m a data scientist and i hated waiting on Numpy/Scikit learn and stuff ;)
22:20:28FromGitter<mratsim> I plan to use it for data science competitions as well.
22:20:34OrganicAnywhereAaah!
22:21:06FromGitter<mratsim> And I’m planning on doing a Starcraft 2 AI. Currently I did a wrapper for the Arcade learning Environment, so you can do bot for Atari games
22:22:12FromGitter<mratsim> @brentp ssue for the primitives you would like to see. I probably won’t implement too much manually but some are just too slow
22:22:22OrganicAnywhereThat sounds very interesting! I'll keep myself updated. I have a close relative who does AI research.
22:22:27Araqhmm the copying GC that I wrote is in a file called 'temp.nim'
22:22:34Araqthat can't be right...
22:22:46FromGitter<mratsim> like `exp` and `log`. I don’t understand why math.h can be improved 10x upon
22:23:08FromGitter<mratsim> open an issue* bad keyboard ignoring characters
22:23:51FromGitter<brentp> @mratsim. will do. I mostly mean using the openmp stuff for loop parallelization.
22:24:09FromGitter<brentp> also, I see now there is a getStream() in zipfiles, that should get me started.
22:24:17FromGitter<mratsim> oh I see
22:24:27Araqhttps://gist.github.com/Araq/e0c5603cb9d318512bb63554c3e03ec2 here, have a copying GC
22:24:45Araqwanted to make this Nim's "async" collector
22:25:19FromGitter<mratsim> @OrganicAnywhere, everything I’m working on regarding AI in Nim is in the “ecosystem” section of my release notes: https://github.com/mratsim/Arraymancer/releases/tag/v0.5.0
22:25:25Araqit's more low level than I advised you to do it
22:25:45Araqbut it seems to work
22:26:58OrganicAnywhereAraq: Well, at the very least I can look at it and learn something. :)
22:28:21OrganicAnywheremratsim: I'll save this for sure. I have an idea for a game involving an AI that learns. In a few years ;)
22:28:35Araqit's a completely precise GC btw, not what Nim does
22:28:54OrganicAnywhereI will be looking at your laser folder
22:29:14FromGitter<mratsim> @brentp, yeah the BLAS speed is cool, and thanks to Nim metaprogramming, supporting a new architecture or SIMD (like SSE, AVX) is very easy: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c200c3a93cce97d3b89a1cf]
22:30:01FromGitter<mratsim> ^ code for the fastest int32 BLAS (well no one has one so …)
22:30:58*filcuc quit (Quit: Konversation terminated!)
22:31:05AraqOrganicAnywhere: and the code had a bug which took me about 4 hours to figure out :-)
22:31:23Araqeven though it's a textbook algorithm
22:31:48Araqso yeah ... better start with something else
22:31:57*filcuc joined #nim
22:32:09FromGitter<mratsim> Actually people from Facebook are now asking me to run benchmarks on their matrix multiplication implementation for their neural network compiler: https://github.com/pytorch/glow/issues/1749#issuecomment-447401410
22:32:47OrganicAnywhereHmmm... so no copying gc? But you still recommend the cycle gc?
22:34:13FromGitter<zacharycarter> @mratsim - when I toyed with SIMD, I found the most annoying bit getting all of the compiler flags right
22:34:28AraqOrganicAnywhere: yeah but only because I need it :P
22:34:35FromGitter<zacharycarter> and understanding what was available on what hardware
22:35:23FromGitter<zacharycarter> but I also didn't try very hard before I decided all of the complexity required to sort all of that all out wasn't worth it given the time constraint I was working with
22:35:25FromGitter<mratsim> SIMD have a descriptive name once you used them for a weekend
22:35:41FromGitter<zacharycarter> errr no - it wasn't the instructions
22:35:59FromGitter<zacharycarter> it was like - this cpu and os support this SIMD instruction set
22:36:03FromGitter<zacharycarter> and this other cpu and OS supports this one
22:36:18FromGitter<zacharycarter> and you have to get all of these flags correct (at least I think that's what was giving me trouble when I attempted it)
22:36:18FromGitter<mratsim> it’s only a question of CPU, the OS isn’t part of that.
22:36:22FromGitter<zacharycarter> ah okay
22:37:50FromGitter<zacharycarter> I guess I'm trying to make the point that I had difficulty figuring out how to adapt an example to some code in Nim on my machine is all
22:38:34FromGitter<zacharycarter> not Nim's fault at all - just my inexperience in the subject matter
22:39:10FromGitter<mratsim> for matrix multiplication SIMD makes a huge difference. ⏎ ⏎ With AVX + FMA (Fused multiply add), I reach 135 GFLOPs/s on float32 (with 176.4 theoretical peak) ⏎ With AVX only I reach ~80 GFLOPs/s ⏎ With SSE I reach ~40 GFLOPs/s [https://gitter.im/nim-lang/Nim?at=5c200e8d93cce97d3b89ae06]
22:40:04FromGitter<zacharycarter> yeah these are all of the acronyms I had trouble with
22:40:21FromGitter<mratsim> but the basic rule is that you need to do more than one compute per byte of data.
22:40:42FromGitter<mratsim> otherwise you will be bound by the speed of memory accesses
22:41:08FromGitter<mratsim> i.e. don’t try to SIMD a for loop.
22:41:28Araq /Users/travis/build/nim-lang/Nim/tests/stdlib/tmath.nim(98, 52): Check failed: abs(float(histo[values[i]]) - expected) <= 3.0 * stdDev
22:41:41Araqyay new flaky tests in the suite
22:42:26FromGitter<mratsim> why is this tmath and not trandom :?
22:44:15*nsf quit (Quit: WeeChat 2.3)
22:46:35*filcuc quit (Ping timeout: 268 seconds)
22:52:19Araqiirc there is no trandom
23:05:25OrganicAnywhereThank you Araq and mratsim for your time and advice. Good night and merry christmas :)
23:05:56*OrganicAnywhere quit (Quit: See you in hell, madafaka~)
23:07:21*kapil____ quit (Quit: Connection closed for inactivity)
23:16:12*abm joined #nim
23:39:44FromGitter<Clyybber> @mratsim Let's introduce trandom, the test failures will be hilarious :P