<< 17-05-2018 >>

00:11:57*thomasross__ joined #nim
00:14:43*leorize joined #nim
00:15:09*thomasross_ quit (Ping timeout: 256 seconds)
00:19:52*BitPuffin quit (Remote host closed the connection)
00:44:17*gokr quit (Ping timeout: 248 seconds)
00:47:08*CodeVance joined #nim
00:56:15*endragor joined #nim
01:00:36*endragor quit (Ping timeout: 256 seconds)
01:02:14*skrylar joined #nim
01:38:05*leorize quit (Ping timeout: 240 seconds)
01:38:42*leorize joined #nim
01:59:08FromDiscord<2vg> small container size?
02:04:21*ftsf joined #nim
02:32:52*vivus quit (Quit: Leaving)
02:35:58*xkapastel quit (Quit: Connection closed for inactivity)
02:55:50*endragor joined #nim
03:20:32skrylarmratsim: boop
03:32:10*FuntDobra_ joined #nim
03:37:36*cspar quit (Read error: Connection reset by peer)
03:38:00*cspar joined #nim
03:41:13*CodeVance quit (Read error: Connection reset by peer)
03:41:40*CodeVance_ joined #nim
03:59:10*sz0 quit (Quit: Connection closed for inactivity)
04:03:05*yglukhov quit (Ping timeout: 240 seconds)
04:42:53*dddddd quit (Remote host closed the connection)
04:44:57*FuntDobra_ quit (Ping timeout: 240 seconds)
04:59:13*xkapastel joined #nim
05:02:15skrylarpushed the old neural net code from last year to github, also updates to skflatbuffer
05:02:31skrylarthe gtk3 stuff isn't really interesting enough to post yet
05:05:14*leorize quit (Ping timeout: 260 seconds)
05:25:07*nsf joined #nim
05:38:47*gmpreussner quit (Ping timeout: 268 seconds)
05:39:39*gmpreussner joined #nim
05:40:39*CodeVance_ quit (Read error: Connection reset by peer)
06:02:35*CodeVance joined #nim
06:13:53*leorize joined #nim
06:37:25*gokr joined #nim
06:45:54*thor77 quit (Quit: ZNC 1.7.0 - https://znc.in)
06:47:26*thor77 joined #nim
06:53:17*yglukhov joined #nim
06:55:26*Ven`` joined #nim
06:56:29FromGitter<gogolxdong> How to assign biggest uint64 to a variable?
07:01:00*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:11:24*FuntDobra_ joined #nim
07:14:48FromGitter<survivorm> `let i = high(int64).uint64*2+1`
07:15:05FromGitter<survivorm> looks like it's the shortest way
07:15:29FromGitter<survivorm> Not sure it's the clearest
07:17:54*Ven`` joined #nim
07:19:53FromGitter<survivorm> `let i = high(int64).uint64 + low(int64).uint64`
07:20:07FromGitter<survivorm> I think it's a little better
07:20:36FromGitter<survivorm> In essence, count all + vals and all - vals, as the number is the same
07:23:08FromGitter<survivorm> one little thing is expected, but still a little off. `abs(low(int64))` results in `Error: unhandled exception: over- or underflow [OverflowError]`
07:33:14FromGitter<mratsim> @skrylar, yes?
07:33:44skrylarmratsim i wasn't around to see your answer about arraymancer and TTS stuff
07:33:45FromGitter<mratsim> @gogolxdong let hi_uint64 = not 0’u64
07:34:27*Vladar joined #nim
07:34:42skrylartoying around with the idea of either a macro that converts math in to tensor code or porting my HMMs to nim (which i could probably use arraymancer for, because matrix multiplication)
07:35:34FromGitter<mratsim> would love to be able to write equations like that: http://fluxml.ai/ but we need unicode support
07:36:10FromGitter<survivorm> please... please... no unicode
07:36:18FromGitter<survivorm> in code, at least
07:36:41FromGitter<mratsim> unicode in exported code is a pain yes
07:37:22FromGitter<survivorm> not all editors work well with it, so i don't want issues with 'i've corrected a single line and now code's somehow broken everythere'
07:38:07FromGitter<survivorm> If you want unicode in comments - You're welcome, but not in the code, please
07:38:38FromGitter<survivorm> There are enough rakes in the world to step on beside this one
07:39:13FromGitter<survivorm> And can you explain the magic with ` not 0’u64`?
07:39:32FromGitter<survivorm> what does this op mean
07:39:51FromGitter<mratsim> high(uint8) is 11111111, low(uint8) is 00000000
07:39:58FromGitter<mratsim> not flips the bits
07:39:59FromGitter<survivorm> ah
07:40:05FromGitter<survivorm> i see
07:40:11FromGitter<survivorm> clever one, yes
07:41:14FromGitter<mratsim> ^^
07:44:17FromGitter<mratsim> similarly high(int) can be done like this for arbitrary precision: https://github.com/status-im/nim-stint/blob/master/stint/private/int_highlow.nim#L12-L25
07:44:38skrylarit just looks like this (concept): # Tanh-Elman layers
07:44:38skrylartanh(reduce(inputs * weights) + (hidden * weights.hidden) + bias)
07:44:41FromGitter<mratsim> 1) not shr 1
07:46:43FromGitter<mratsim> @skrylar, I added GRU Cell primitive yesterday, still have to implement a Fused GRU layer: https://github.com/mratsim/Arraymancer/pull/231
07:46:53skrylari saw something about that
07:47:03skrylari'm not sure if merging those in to one codebase is the best of ideas, but everyone is doing it
07:47:18*skrylar has written GRUs by hand .. more times than desired
07:47:32FromGitter<mratsim> what do you mean?
07:47:43skrylarwell shouldn't tensors and layers be separate modules
07:48:09skrylari know torch et all merge them in to one pile, but maybe i just want the tensors to do Markovian models efficiently
07:48:14FromGitter<mratsim> they are, the library is monolithic but internally, it’s cleanly separated
07:48:37skrylaras an aside, i've been lamenting how little crossover there is. someone is either all markov, all evolution, or all neural net :-|
07:49:03FromGitter<mratsim> I even got Intel deep learning guys in my issues (I don’t know how :?): https://github.com/mratsim/Arraymancer/issues/228#issuecomment-388833934
07:49:15skrylarbut yes the math macro .. dunno. wrote some concept code for it. trying to write the concept code for GRUs, but the macro itself == total pain, have to tackle register allocation
07:49:53*floppydh joined #nim
07:49:57FromGitter<mratsim> I’m not all neural nets ;), I’ve added some stats tool as well (covariance matrices, eigenvecs, PCA …)
07:50:16FromGitter<mratsim> I want to add sparse tensors as well
07:50:27skrylari just want a voice synthesizer that isn't trash :(
07:50:58skrylari don't know how torch does it. i think keras one time i peeked creates new tensors all the time
07:51:04FromGitter<mratsim> seems like @cabhishek friend that was developing Vectorflow completely stopped: https://github.com/Netflix/vectorflow so it might be an opportunity to replace D usage at Netflix with Nim :D
07:51:12skrylarAphelion created a pool of "scratch" tensors and reused the memory
07:51:37FromGitter<survivorm> Hearing all this talks i think myself stupid.
07:51:40FromGitter<mratsim> Fused kernels reuse the same tensors
07:51:51skrylari guess thats what i did then
07:51:56skrylari reused the same tensors for all layers
07:52:09skrylarexcept ones set aside for private use (ex. hidden layers, weights)
07:52:33FromGitter<mratsim> @survivorm different fields, talk about networking and async, or B-Trees and I’m lost as well :D
07:52:44skrylarIf you don't care about that, then the macro is easy. just replace a DSL with tensor calls and maybe do some common subexpression caching
07:53:06skrylarhey i understand all of those things :f never done a b-tree by hand though
07:53:48FromGitter<mratsim> Basically my plan is this: https://github.com/mratsim/Arraymancer/issues/175#issuecomment-388215144 ⏎ ⏎ very low-level API Fortran like that never allocates and you have to pass “workspace array” as var parameter
07:53:50FromGitter<survivorm> @mratsim I guess. We're not living Aristoteles, we can't be proficient in everything
07:54:17FromGitter<mratsim> medium level API like torch and PyTorch
07:54:27skrylarthat low level model works; it's what i did
07:54:31skrylarbut the code is ugly
07:54:34FromGitter<mratsim> and high level neural net domain specific language so that NN can be done in like 5~10 lines
07:55:00skrylarvectorflow may have also been killed by tensorflow
07:55:18FromGitter<mratsim> No, Vectorflow addresses a unique need, Sparse neural networks
07:55:29skrylardidn't cafe or keras (one of the research ones) basically seppuku'd because one is just too big of a marketing target, can get randos off the street to hack bad tensorflow models together
07:55:33skrylarah
07:55:39FromGitter<mratsim> Netfliw apparently must processes millions of columns per client
07:55:43FromGitter<mratsim> Netflix*
07:55:49skrylarwell, i just need a few good small ones :)
07:56:05FromGitter<mratsim> so they have 1M x 50M tensors =)
07:56:32skrylaryea. hidden markovs have some sparsity issues at times
07:56:59skrylari still feel that if you have millions of parameters you are doing it wrong; technique > power, every time
07:57:30skrylarthere is that paper where someone is passing captchas ~99% because they changed from convnets to some message passing micro thing
07:57:54skrylari could get the paper next time i'm browsing archives if its still there
07:58:21FromGitter<mratsim> I didn’t check if they used unsupervised diensionality reduction, as far as I know they used logistic regression and softmax multiclass classification mostly.
07:59:10skrylarhm
07:59:20skrylardunno. i've been out of the AI game for eight months
07:59:38skrylarI am curious why nobody is using the gradient descent by gradient descent
07:59:41FromGitter<mratsim> the library is just 5k lines of code or so I think
07:59:46skrylarthe google paper claims an order of magnitude reduction in training time
08:00:10FromGitter<mratsim> PyTorch implemented Hessians just 6 months ago I think?
08:00:27FromGitter<mratsim> but they had L-BFGS since the beginning
08:01:03*noonien joined #nim
08:01:08skrylaranyway guessing can rely on sorting the commutative ops by hash or some deterministic value, caching those in a list and then somehow backwardsing single assignment from that
08:01:30skrylarso you give it the GRU formula in text, and it somehow converts that in to a neat set of scratch calls
08:01:51FromGitter<mratsim> sounds like fun :P
08:02:02FromGitter<mratsim> you could train a NN to do that ;)
08:02:36FromGitter<mratsim> with a numerical_gradient as the loss function to optimize :P
08:02:56skrylari would have to already have the NN code to do that
08:03:02skrylarand it would probably make the compile time depressing
08:03:36skrylari also wonder what happens if you run an FFI before wavenet
08:03:55skrylarsuspect it's so slow because its trying to invent the fourier transform using neurons :hrm:
08:04:07FromGitter<mratsim> I still have to look into WaveNets, never tried one. So little time ...
08:04:18skrylarwell, deep voice and tacotron are quite good
08:04:27*gmpreussner quit (Ping timeout: 240 seconds)
08:04:36skrylaryou produce mel-cepstral data and let wavenet "fill in the gaps" between the cepstral frequencies and original sound
08:05:07skrylarthe fault here is that they're all end-to-end, so you can't do smart things like train the wavenet on 50 voices. it turns out, baidu did (kind of) and it works perfectly
08:05:23FromGitter<mratsim> I tried to use multi-attention GRU for a 24h iron-man competition to predict traffic in a city: https://github.com/mratsim/McKinsey-SmartCities-Traffic-Prediction#results the results were bad >___>
08:05:28*gmpreussner joined #nim
08:05:35skrylari think taco/deepvoice cut out about half of wavenet, and baidu published a guide on running a full wavenet in real time
08:05:49skrylarallegedly deep voice 3 can clone a voice from 30 minute samples
08:06:03skrylarwell, it can borrow from test corpuses and adapt what it knows to be that voice anyway
08:06:18skrylari want this on my desktop =p
08:06:25FromGitter<mratsim> lol
08:06:31FromGitter<mratsim> robot voice is enough
08:08:51skrylarnot that you need it, but skflatbuffers (soon to be renamed) now exports in protobuf and supports arrays/seqs with very little boilerplate
08:08:57skrylarre-import is still. eh
08:09:19skrylarflatbuffers are going to be a pain to import
08:10:18*jaco60 joined #nim
08:12:37skrylarwell thats all i had to say really. have to try and figure out arraymancer at some point
08:15:23FromGitter<gogolxdong> what the wrapper of a span over string?
08:16:36*ftsf quit (Read error: Connection reset by peer)
08:16:43FromGitter<gogolxdong> never mind ,it's """
08:17:21*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:20:13*Ven`` joined #nim
08:24:16FromGitter<gogolxdong> How to get the type of variable?
08:26:48*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:27:35*FuntDobra_ quit (Ping timeout: 240 seconds)
08:27:41Yardanicotype(variable)
08:29:31*FuntDobra_ joined #nim
08:31:13*Ven`` joined #nim
08:31:14FromGitter<gogolxdong> and how to get the string literals?
08:31:39Yardanicoyou mean type of a variable as string?
08:31:49Yardanico!eval import typetraits; let a = 1; echo type(a)
08:31:51NimBotint
08:32:13Yardanicoyou need to "import typetraits" since this module provides $ procedure for a typedesc
08:33:26FromGitter<gogolxdong> alright
08:35:27*Ven`` quit (Ping timeout: 240 seconds)
08:55:48FromGitter<mratsim> The completely unscientific bench is getting out of hands: frol/completely-unscientific-benchmarks@9e13da0
08:59:02Yardanicowait , Nim "manual" (static) is faster than any other one
08:59:10Yardanicoon "Tunned Implementations Scoreboard"
08:59:30FromGitter<mratsim> yes Nim is the current speed king
08:59:56Yardanicoand it will be much faster in ""Naive" Implementations Scoreboard" after new nim stable ;)
09:14:47*xet7 joined #nim
09:20:32*sendell joined #nim
09:21:03*FuntDobra_ quit (Ping timeout: 255 seconds)
09:29:50FromGitter<mratsim> I still want to fix the need to {.noInit.} ref object.
09:29:52*FuntDobra_ joined #nim
09:30:07*ofelas joined #nim
09:33:45*FuntDobra joined #nim
09:34:58*FuntDobra_ quit (Ping timeout: 268 seconds)
09:36:51*FuntDobra_ joined #nim
09:39:13*FuntDobra quit (Ping timeout: 248 seconds)
09:51:14*thor77 quit (Quit: ZNC 1.7.0 - https://znc.in)
09:52:12*thor77 joined #nim
10:11:26*leorize quit (Ping timeout: 265 seconds)
10:21:44*FuntDobra_ quit (Ping timeout: 256 seconds)
10:29:29*FuntDobra_ joined #nim
10:34:52*cspar_ joined #nim
10:37:27*cspar quit (Ping timeout: 240 seconds)
10:39:29*xet7 quit (Ping timeout: 248 seconds)
10:51:31*xet7 joined #nim
11:03:36*Ven`` joined #nim
11:04:08*Snircle joined #nim
11:24:53*ofelas quit (Remote host closed the connection)
11:29:55*ofelas joined #nim
11:30:08*dddddd joined #nim
11:34:09FromGitter<tim-st> @mratsim When I create a fixed size array (not seq) as var type (so I can change entries at index) at the top of the proc is this done at compile time and if I call it like 100_000 times will this be slower than using a link to a buffer?
11:34:50FromGitter<tim-st> yesterday I thought I need a seq with cap now I know there is always an upper limit
11:34:53FromGitter<mratsim> faster
11:35:09FromGitter<tim-st> but will this still be created at each call?
11:35:15FromGitter<mratsim> a heap allocated buffer would have to wait for the OS to give it memory.
11:35:42*thomasross__ quit (Quit: Leaving)
11:35:45FromGitter<mratsim> the space is reserved at compile-time in the binary produced
11:36:14FromGitter<mratsim> be default it will have to be zero-ed out with memset
11:36:39FromGitter<mratsim> but you can use var buffer{.noInit.} = array[10, int] if initiailization is not needed
11:36:58*FuntDobra__ joined #nim
11:37:03FromGitter<tim-st> thanks, what will be in there instead? :D
11:37:05FromGitter<mratsim> be aware that you can only have about 2K~4k stack size depending on your OS
11:37:20FromGitter<tim-st> I need 10byte only
11:37:25FromGitter<mratsim> instead, random junk, probably past discard variables/results
11:37:50FromGitter<mratsim> discarded*
11:38:01FromGitter<mratsim> what the program used this memory for before
11:38:29FromGitter<tim-st> ah ok, makes sense, thank you!
11:39:03FromGitter<tim-st> then I will possibly make the quickest implmentation of all languages :D
11:39:23FromGitter<mratsim> 10 byte is super small by the way, an uint64 is already 8 bytes
11:39:57*FuntDobra_ quit (Ping timeout: 264 seconds)
11:40:12FromGitter<tim-st> yes
11:42:40FromGitter<tim-st> *36bytes needed
11:43:17FromGitter<tim-st> but still should be good :)
11:46:28FromGitter<tim-st> btw does the type Seq uses `noInit` too? at least it could
11:47:17FromGitter<tim-st> ok, there is `newSeqUninitialized`
11:50:38*sendell quit (Ping timeout: 268 seconds)
11:50:55*jjido joined #nim
11:59:37*FuntDobra__ quit (Remote host closed the connection)
12:00:24*FuntDobra joined #nim
12:02:13*leorize joined #nim
12:12:37*sendell joined #nim
12:27:07*DarkArctic_ joined #nim
12:28:46*DarkArctic_ quit (Client Quit)
12:29:07*DarkArctic joined #nim
13:02:50*athenot joined #nim
13:26:50*nsf quit (Quit: WeeChat 2.1)
13:27:57*FuntDobra quit (Ping timeout: 260 seconds)
13:28:39*FuntDobra joined #nim
13:31:30*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:40:34*Ven`` joined #nim
13:41:09*Ven`` quit (Client Quit)
13:47:14*BitPuffin joined #nim
13:52:51dom96https://travis-ci.org/dom96/geckodriver-travis/builds/380221171
13:52:52dom96:D
13:52:59dom96Headless firefox tests on travis with web driver :)
14:02:22*leorize quit (Ping timeout: 260 seconds)
14:04:25*Ven`` joined #nim
14:04:49*FuntDobra quit (Ping timeout: 248 seconds)
14:07:41*endragor quit (Remote host closed the connection)
14:13:45*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:14:35*leorize joined #nim
14:15:34*Ven`` joined #nim
14:19:33FromGitter<ephja> does anyone else only see links to "https://github.com/zah/grip-lang/..." and so on, and not the official repo when googling nim topics? :p
14:20:54FromGitter<Vindaar> the official repo is the 3rd result googling "nim lang" for me (after the website and wikipedia)
14:25:54*endragor joined #nim
14:26:23*leorize quit (Ping timeout: 255 seconds)
14:27:19FromGitter<ephja> it might mostly be when including terms that appear in code
14:28:05FromGitter<Vindaar> if you provide an example..? :) from my experience in general I find what I search for
14:28:38*leorize joined #nim
14:29:20FromGitter<ephja> try `nim mAstToStr`
14:29:31FromGitter<ephja> I should just use github's search feature
14:29:52FromGitter<Vindaar> in that case I get the same as you, yes
14:30:13FromGitter<Vindaar> the only times I used github's search I was thoroughly disappointed
14:30:25*endragor quit (Ping timeout: 248 seconds)
14:31:09FromGitter<ephja> @zah I guess you need to remove the aforementioned repo :p
14:31:23FromGitter<ephja> that university with its old version too. lol
14:31:24FromGitter<Vindaar> in general though a combination of https://nim-lang.org/docs/theindex.html, the manual and grepping through the source code in the command line is all it takes
14:36:20FromGitter<ephja> yeah that's good enough
14:39:20*BitPuffin quit (Remote host closed the connection)
14:39:55*BitPuffin joined #nim
14:52:46*miran joined #nim
15:08:30*xkapastel quit (Quit: Connection closed for inactivity)
15:16:25*Trustable joined #nim
15:16:53*floppydh quit (Quit: WeeChat 2.1)
15:20:18*leorize quit (Quit: WeeChat 2.1)
15:22:11*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:41:31*FuntDobra joined #nim
15:58:08*sz0 joined #nim
15:59:20*FuntDobra quit (Ping timeout: 256 seconds)
16:05:06*nsf joined #nim
16:20:32FromGitter<brentp> is there a standard dockerhub repo for nim? would be nice to rely on that for travis, etc.
16:20:52FromGitter<mratsim> @yglukhov ^
16:21:45FromGitter<mratsim> @brentp both: https://github.com/moigagoo/nimage and https://github.com/yglukhov/nim-docker but I would like an official docker build as well
16:23:51FromGitter<mratsim> and for devel: https://github.com/status-im/nim-docker sometimes it includes unmerged PR but 99% of the time it’s equal to Nim-devel
16:24:07FromGitter<brentp> great! thanks.
16:24:47FromGitter<brentp> is there an estimated date for 0.18.1?
16:25:14FromGitter<mratsim> none, 0.18.1 is for devel ;)
16:25:30FromGitter<mratsim> next version is either 0.18.2 or 0.19.0
16:25:51FromGitter<mratsim> I would guess 0.19.0 due to the potential breaking nil changes
16:30:15*sendell quit (Remote host closed the connection)
16:30:15*jjido quit (Read error: Connection reset by peer)
16:31:42Yardanicoeven fac procedure may be broken in old code (which uses math module)
16:32:00Yardanicobecause before it could compute bigger factorial numbers, but now it only has a precomputed table
16:32:13Yardanicoup to fac(21)
16:33:25FromGitter<mratsim> but fac22 is bigger than high(uint64) or something no?
16:36:13Yardanicowell, it works for JS target at least :) and it broke my math library a bit (well, nil changes broke it too)
16:36:37Yardanicodoesn't really matter anyway, just saying :)
16:37:57FromGitter<mratsim> I suddenly want to do a bit of project Euler :P
16:47:03FromGitter<Varriount> @mratsim "Nim 0.19.0: Bull in a China Shop"
16:52:17FromDiscord<treeform> what is the potential breaking nil change?
16:53:57*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
16:55:14*NimBot joined #nim
16:55:30FromGitter<brentp> I have been hitting a few bugs that are fixed in 0.18.1
16:58:11Yardanico@treeform you can't access null terminator in strings
16:58:33Yardanicoalso strings/seqs are not nil anymore, you don't have to initialize them
16:58:37Yardanicoread changelog for more info :)
17:08:14miranYardanico: is that by default or only behind .experimental.?
17:08:21YardanicoAFAIK by default
17:08:36Yardanicoand about strings - you can get old behaviour with a switch
17:08:47Yardanico(i don't remember the exact name, it's in changelog)
17:09:26FromGitter<data-man> --laxStrings:on
17:24:14Araqtreeform: cstring(nimstring) still works and cstrings have access to the zero terminator
17:33:19FromDiscord<treeform> never needed the null terminator on strings
17:33:55Yardanicowell, they're quite useful when you do some parsing
17:36:08*CodeVance joined #nim
17:39:15enthus1astcan i "monkeypatch" nim functions somehow? For example to let httpclient use my implementation of new(Async)Socket to, for example, connect to an SOCKS server?
17:44:04enthus1asti guess this is what the "dependency injection" meme is for
17:45:52subsetparkenthus1ast: yes, you can use the `patchFile()` function in a .nims with the same name as your test file
17:46:21subsetparkthe nims will get evaluated when the test file is run, and that can replace some library module with a module that you write
17:49:41enthus1astthen i import the original and export all but my changed procedures i guess
17:52:27subsetparki couldn't get that to work. the patch makes it so that it ends up as a circular import.
17:52:59subsetparkbut you can always set up your code so you have an intermediary service layer that can be more easily patched
17:57:20FromGitter<data-man> Just added filecompress to nimsnappyc/tests. Happy compressing! 😄
18:01:53FromGitter<data-man> And dared make my first commit to Nim's repo. 😄
18:02:58enthus1ast:)
18:09:44enthus1astif we have it about SOCKS, it seems the tcp bind is somehow misdesigned, since it allows just one incomeing connection
18:19:35*FuntDobra joined #nim
18:22:14*koranza joined #nim
18:27:10koranzahey guys, has anyone had "nimble install [anything]" crash the windows command line before?
18:27:22koranzaI'm on Windows 10 and used choosenim to install nim and switched to the devel branch. It appears that to also happen for 0.17.0 and choosenim's stable branch (0.18.0)
18:28:53mirani have installed just a few packages on windows, but i haven't had any crashes
18:28:59Yardanicohmm, never experienced crashes in windows cmd
18:29:15Yardanicoreally never
18:29:18koranzaI've worked around it by changing the file "C:\Users\[username]\.choosenim\toolchains\nim-#devel\dist\nimble\src\nimblepkg\download.nim" in the command "doClone"
18:30:33koranzaif I change the line about "doCmd(git clone.....)" to provide a second argument to doCmd of "showOuput = true" it gets past that crash
18:32:11koranzaThere was a 2nd issue then about index out of bounds which required changes to "C:\Users\[username]\.choosenim\toolchains\nim-#devel\lib\pure\os.nim"
18:32:30miranstrange
18:32:55miranis this fresh/recent install of nim?
18:33:08*nsf quit (Quit: WeeChat 2.1)
18:33:48koranzain the findExe proc around line 154, need to change "var x = (if candidate[0] == '"'...." to be "var x = (if candidate.len > 2 and candidate[0] == '"' ...."
18:35:43koranzaI would guess so, it's whatever happens after running "choosenim update devel"
18:39:25dom96"crash the windows command line"?
18:39:36dom96Do you mean that the command window itself crashes?
18:40:42*sz0 quit (Quit: Connection closed for inactivity)
18:40:44koranzaYeah, it disappears completely. Most times I can't see it as a process using Process Explorer, but one time I saw it still running but not visible
18:41:29Yardanicowait, how do you launch your windows cmd?
18:43:42koranzaThe last time I launched it, it was from the Windows File Explorer. File > Open new command prompt > Open command prompt
18:44:40*Sembei joined #nim
18:50:19*Sentreen quit (Remote host closed the connection)
18:53:52dom96Perhaps this is a bug report for Microsoft :)
19:06:41*smt quit (Ping timeout: 248 seconds)
19:08:26koranzaThey're anti-Nim now? xD
19:08:46koranza"This operation is forbidden. All software must be .Net"
19:08:50*endragor joined #nim
19:10:48*Sentreen joined #nim
19:13:33*endragor quit (Ping timeout: 264 seconds)
19:16:38*koranza quit (Quit: leaving)
19:20:26FromGitter<ephja> it was fun to experiment with Racket, but who knows if you ever get used to the syntax
19:21:38*jaco60 quit (Remote host closed the connection)
19:22:41*vegax87 quit (Changing host)
19:22:41*vegax87 joined #nim
19:22:41*vegax87 quit (Changing host)
19:22:41*vegax87 joined #nim
19:27:07*jaco60 joined #nim
19:32:15*BitPuffin quit (Remote host closed the connection)
19:49:43*xkapastel joined #nim
19:54:28Yardanicogithub changed how main page looks? https://i.imgur.com/sjltzUu.png
19:56:08dom96indeed
19:56:09dom96wat
19:56:40dom96why change the sides?
19:56:45Yardanicoyeah, I was confused too
19:56:53dom96feels like they're making changes for the sake of it
19:56:59Yardanicobtw, what is this one? https://www.youtube.com/watch?v=TP-YBOGQmLM
20:00:10dom96ooh, wonder who gave this talk
20:00:20dom96Don't recognise him :)
20:06:17Yardanicoalso found this website http://helloworldcollection.de/ :)
20:06:51FromGitter<xmonader> how can i define product types in object variant?
20:07:06Araqa product type is a tuple
20:07:08FromGitter<xmonader> or i use a tuple in the variant instead?
20:07:20FromGitter<xmonader> yup thanks @Araq
20:08:04Yardanicowait, what, there's a GNU Hello world program? eh... https://www.gnu.org/software/hello/
20:11:35skrylaris the license longer than the program
20:22:47thor77Yardanico: huh, it's in german oO looks interesting, though
20:34:54FromGitter<xmonader> what's named expression? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5afde76ef04ce53632e701c5]
20:35:10FromGitter<xmonader> i get named expression isn't allowed here in the third statement
20:37:44*nsf joined #nim
20:38:36FromGitter<xmonader> wow movign the sequence to the above line fixed it, but so unclear error message it was giving me the error at `remaining:rem`
20:40:33*FuntDobra quit (Ping timeout: 255 seconds)
20:54:03FromGitter<stisa> @xmonader maybe you need a space between `:` and `@`? I think I remember an error like that
20:54:31*Vladar quit (Quit: Leaving)
21:01:48FromGitter<mratsim> haha Ithink you found it
21:21:35*miran quit (Ping timeout: 276 seconds)
21:25:31*Trustable quit (Remote host closed the connection)
21:25:46*nsf quit (Quit: WeeChat 2.1)
21:51:18*qwertfisch is now known as qwertschaf
22:01:06*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:11:24*aleandros joined #nim
22:25:56*CodeVance_ joined #nim
22:28:41*CodeVance quit (Read error: Connection reset by peer)
22:37:48FromGitter<brentp> @mratsim I am trying to do with Arraymancer: `arr[i, _, _] = something` where arr.shape == `[2000, 300, 4]` and something.shape == `[300, 4]`
22:38:04FromGitter<brentp> but I get error: `unhandled exception: Your tensors or openarrays do not have the same shape: [1, 300, 4] and [300, 4] [IndexError]`
22:38:38FromGitter<brentp> how can I get around this?
22:48:31AraqI don't have Ruby installed, who can run this for me...
22:48:32Araqhttps://github.com/kostya/benchmarks/blob/master/json/generate_json.rb
22:48:41Araqand gist the JSON please
22:51:40Araqor translate the script to Nim for me :-)
22:51:46Araqthat would be even better
22:52:52Araqoh well, I can almost figure it out on my own :P
22:56:46FromGitter<xmonader> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5afe08ae2df44c2d0637f6e0]
22:56:47FromGitter<xmonader> i get attempted to call undeclared routine `p`
22:56:54FromGitter<xmonader> any idea how to solve this?
22:57:33FromGitter<xmonader> oops sorry forget it i figured it out, another question then can i override *call* for object?
22:57:53Araqproc `()`(o: MyObject)
22:57:58Araqbut it's .experimental
22:58:17FromGitter<xmonader> thanks ^_^
22:58:59FromGitter<Vindaar> @brentp for the tensor with shape `[1, 300, 4]` you can use the `squeeze` proc to remove that dimension of length 1
23:00:45*xet7 quit (Read error: Connection reset by peer)
23:10:22*CodeVance__ joined #nim
23:10:27*skrylar quit (Ping timeout: 240 seconds)
23:12:28*CodeVance__ quit (Client Quit)
23:14:02*CodeVance_ quit (Ping timeout: 276 seconds)
23:19:03*arecaceae quit (Remote host closed the connection)
23:19:26*arecaceae joined #nim
23:20:16Araqmuhahaha
23:20:27Araqstdlib: used Mem: 1.277GiB
23:20:44Araqpackedjson: 140.063MiB
23:25:59Araqtime: 3.1s vs 3.7s
23:26:17Araqsmaller by a factor of 10. and faster too
23:28:26FromDiscord<treeform> Hey Araq, i also did experiments with "packedjson" like structures.
23:28:35FromDiscord<treeform> I messages you but you never replied.
23:28:51Araqhuh, gitter?
23:28:57Araqnever saw your messages, sorry
23:29:07FromDiscord<treeform> I think I just @ you here and you did not notice and I forgot too.
23:29:33FromDiscord<treeform> I did a simpler one, which was just a string:string packed dictionary.
23:30:06FromDiscord<treeform> I saw slow downs on small scale but when I scaled it up it was a significant speed up.
23:31:01FromDiscord<treeform> My guess is that it used less memory and memory next to each other, it kept the memory caches hotter.
23:31:27Araqhttps://github.com/Araq/packedjson
23:32:47Araqand I haven't optimized it much (yet)
23:33:27FromDiscord<treeform> This is what i did: https://gist.github.com/treeform/eab4d05013d0953cbec580466e1018d7
23:34:56FromDiscord<treeform> mine is much simpler
23:37:51*noonien quit (Quit: Connection closed for inactivity)
23:38:13Araqmine is a json.nim replacement
23:39:14FromDiscord<treeform> Araq, I am looking at your parser, it looks like you create a new buffer, but could you make it faster if you just clobber the existing json buffer with control bytes and NOP bytes, some thing like parseJsonClobber maybe?
23:39:26*gokr quit (Ping timeout: 255 seconds)
23:40:53FromDiscord<treeform> You also seem to do a liner scan for [] and contains. How does the current implementation work?
23:41:19Araqthe current or mine?
23:42:12Araqit's really simple.
23:42:22AraqI use a binary Lisp tree
23:42:38Araq(a (b c) d)
23:42:57Araq( is mapped to \0, ) is \1 and the space is \2
23:43:19AraqI keep strings unescaped so they can't contain these bytes
23:43:38Araqthat's it. 3 control bytes to navigate the structure.
23:43:46*leorize joined #nim
23:44:15Araqoh and the space is not a separator, but a terminator
23:44:27Araqmakes the algorithms simpler
23:44:41FromDiscord<treeform> neat
23:45:03FromDiscord<treeform> so like "(a (b c ) d )"?
23:45:25FromDiscord<treeform> or "(a (b c )d )"
23:45:33Araq"(a (b c ) d )"
23:46:09FromDiscord<treeform> "(a (b c ) d ) "?
23:46:27FromDiscord<treeform> do you need the last space?
23:46:32Araq"(a (b c ) d )"
23:46:37Araqno, as I wrote it.
23:46:41FromDiscord<treeform> In JsonNode what do a or b point to?
23:46:57FromDiscord<treeform> Why do you need a space after ")" node?
23:47:01Araqslices into the t[] string
23:47:14AraqI don't need the space, but it keeps things simple
23:47:23FromDiscord<treeform> start and end?
23:47:25Araqevery list element is terminated by a space
23:47:28FromDiscord<treeform> or start and len?
23:47:40Araqstart..end (inclusive)
23:48:32FromDiscord<treeform> you store ints as strings? so that you need to parseInt?
23:48:51Araqyeah, think about the control bytes
23:49:04Araqbut it also helps to keep the representation small in memory.
23:49:11Araqusually numbers are small
23:49:19Araqand take up less than 8 bytes
23:49:46FromDiscord<treeform> yeah that is true but you talked about the SQLite number encoding.
23:49:52FromDiscord<treeform> which is even better?
23:50:19FromDiscord<treeform> Also you store bool as full true or false, but you only check for 't'?
23:50:36Araqno, I store it as 't' and 'f'
23:50:55Araqalso, yeah, you can use SQLite's number represenation (I have the code ready)
23:51:14Araqbut then you need to convert the number into ascii for pretty/$
23:51:39Araqand for json "back to string" is important (send to websocket...)
23:51:57FromDiscord<treeform> https://github.com/Araq/packedjson/blob/master/packedjson.nim#L432
23:52:13FromDiscord<treeform> looks like you store full "true" or "false" and "null" or I am not reading it right.
23:52:25Araqthat is proc toPretty
23:52:36Araq(stringification)
23:52:48Araqso you're looking at the wrong thing
23:53:12FromDiscord<treeform> ok got it!
23:53:28FromDiscord<treeform> ok found it: https://github.com/Araq/packedjson/blob/master/packedjson.nim#L604
23:55:04FromDiscord<treeform> I don't see you adding space after the } https://github.com/Araq/packedjson/blob/master/packedjson.nim#L630
23:55:32FromDiscord<treeform> You said it should have a space after it: "(a (b c ) d )"
23:55:36Araqnot every ) gets the space
23:55:42Araqit's really simple.
23:55:49Araqthe space comes after the element in the list.
23:56:04Araqif the element is itself a () tree, it still gets the space.
23:56:25FromDiscord<treeform> Got it. Yeah is see it now. Thanks.
23:56:38FromDiscord<treeform> only inside a [] or {} there is a space between elements.
23:56:54Araqonly these have elements.
23:56:58Araqthe others are atoms.
23:58:19FromDiscord<treeform> Do you think this can be used for other data structures, like in native nim?
23:58:39Araqwhat do you think? that JSON is some toy data structure? :P
23:58:46FromDiscord<treeform> foo = object {.bufferpacked.}
23:58:52FromDiscord<treeform> and it handles string packing for you?
23:59:19FromDiscord<treeform> and you can use them as normal objects/
23:59:22FromDiscord<treeform> and you can use them as normal objects?
23:59:31FromDiscord<treeform> you probably don't need to store keys though
23:59:40FromDiscord<treeform> you know the element # at compile time.
23:59:52Araqdoesn't help, it's all variable sized