<< 16-12-2017 >>

00:01:15*yglukhov joined #nim
00:03:31dom96Writing their name should be enough
00:04:21FromGitter<kayabaNerve> I went back to an old project of mine
00:04:39FromGitter<kayabaNerve> Forget the command for compiling, can't check my history....
00:04:46qihdom96 Are you highlighted?
00:05:22dom96Yes, but I'm not on gitter
00:05:25FromGitter<kayabaNerve> It should be: ⏎ nim c -r .\main.nim -d:csfmlNoDestructors --deadCodeElim:on ⏎ ⏎ But I'm getting ⏎ lib\map\mapObjects.nim(10, 9) template/generic instantiation from here ... [https://gitter.im/nim-lang/Nim?at=5a34634503838b2f2afe0ed1]
00:05:35qihAh ty anyway
00:05:45FromGitter<kayabaNerve> I don't want to disable the whole GC though and can't find a function specific pragma.
00:05:47*yglukhov quit (Ping timeout: 256 seconds)
00:05:52FromGitter<kayabaNerve> qih: Just type @username
00:06:21qih@kayabaNerve Are you highlighted?
00:06:24FromGitter<kayabaNerve> Yes
00:06:32qihExcellent, ty peeps
00:06:59FromGitter<kayabaNerve> So. I tried removing the no destructors flag. No diff. This compiled before (I have a running exe in the folder) and this should be the command. Issue is it's trying to GC a seq that doesn't have '=destroy'. How can I fix this/manually write a fix?
00:07:13FromGitter<kayabaNerve> I don't mind adding my own =destroy if I can get some reference as to what it is
00:07:32FromGitter<kayabaNerve> And I haven't updated anything since then. (No gcc, Nim, Nimble, or package updates)
00:08:00FromGitter<kayabaNerve> I don't mind disabling the GC in problem areas if I can keep it system wide...
00:08:26FromGitter<kayabaNerve> Oh. Code itself. ⏎ ⏎ ``` var ⏎ sprites: seq[Sprite] = newSeq[Sprite](0)``` [https://gitter.im/nim-lang/Nim?at=5a3463fa232e79134d55d80a]
00:09:35FromGitter<kayabaNerve> ! The solution was to move the file name to the end of the command. I'm an idiot lol. I'm leaving. Thanks anyways. Happy to help qih
00:09:44*nsf quit (Quit: WeeChat 1.9.1)
00:10:35qihSee ya
00:22:49*qih quit (Quit: leaving)
00:29:20*qih joined #nim
00:29:37FromGitter<mratsim> @dustinlacewell, @ephja I think @Araq has some compiler optimisations in mind for `opt` that you can’t do in a library. For example for nilable ref/pointer types.
00:30:01FromGitter<dustinlacewell> this sounds like golang all over again
00:32:07FromGitter<mratsim> what happened with go?
00:33:02*onionhammer quit (Quit: WeeChat 1.9.1)
00:34:08*onionhammer joined #nim
00:42:56*onionhammer1 joined #nim
00:44:19*onionhammer quit (Ping timeout: 256 seconds)
00:45:35FromGitter<dustinlacewell> @mratsim There are a number of types for which there is special support in the compiler and hence you cannot build libraries around them
00:46:09FromGitter<dustinlacewell> Having spent about a month working with F# (and years with C#) it would be very strange to not just be able to create a generic discriminated union, and implement the monad operators for it
00:46:23FromGitter<dustinlacewell> Option is not the only union that is useful
00:47:19FromGitter<dustinlacewell> Lets say you create a monad `type Response = Reply of Reply | Error of Error | Failure of Failure`
00:47:29*lastjedi quit (Ping timeout: 248 seconds)
00:47:46FromGitter<dustinlacewell> Where each underlying type of each union variant is a structure or something. That’s a lot more data than just a single generic value.
00:55:39*marenz__ quit (Ping timeout: 256 seconds)
01:02:03AraqI was taught ML in university fwiw, there is no need to lecture me about sum types
01:02:55Araqthere is no optimization of 'opt' that couldn't be done in Nim and Nim is not Golang, thanks.
01:03:28FromGitter<dustinlacewell> Classic Araq, taking offense the most extreme thing you didn’t say in the first place
01:03:59FromGitter<dustinlacewell> I said compiler support for a specific union type sounds like compiler support for some types in golang. When you say it outloud you might notice it does sound similar :)
01:04:27FromGitter<dustinlacewell> And I would never lecture you other than to learn what I don’t understand
01:04:42*FromGitter * dustinlacewell rides away on a paradox.
01:08:16*yglukhov joined #nim
01:09:18Araqall day long I am told about Clojure's immutable data structures, Pony's concurrency, Elm's error messages, Smalltalk's VM, Rust's borrow checking, Go's interfaces... why not ask in #nim how do write Nim?
01:09:41Araq*to
01:12:57*yglukhov quit (Ping timeout: 264 seconds)
01:18:57qih@Araq As the Australians would say "F*** 'em (other languages) and the horse they rode in on" 8-)
01:35:31*yglukhov joined #nim
01:39:43*yglukhov quit (Ping timeout: 248 seconds)
01:47:27*foo_ joined #nim
02:03:34FromGitter<dustinlacewell> I mean its kinda hopeful to wish that your thing existed in a void, and that even people who were in invested in your language fully would not look outwardly in comparative analysis
02:03:40FromGitter<dustinlacewell> But no doubt it gets wearysome
02:09:27*yglukhov joined #nim
02:13:51*yglukhov quit (Ping timeout: 256 seconds)
02:30:58*chemist69 quit (Ping timeout: 255 seconds)
02:45:11*chemist69 joined #nim
02:55:59*yglukhov joined #nim
03:00:19*yglukhov quit (Ping timeout: 256 seconds)
03:15:16*solitudesf joined #nim
03:35:39*yglukhov joined #nim
03:36:48*kinironote joined #nim
03:37:49*kinironote quit (Client Quit)
03:39:48*yglukhov quit (Ping timeout: 240 seconds)
04:08:08*gmpreussner quit (Ping timeout: 240 seconds)
04:08:38*gmpreussner joined #nim
04:17:21*xkapastel joined #nim
04:26:32*endragor joined #nim
05:10:44*yglukhov joined #nim
05:14:06*astronavt joined #nim
05:14:15*astronavt quit (Remote host closed the connection)
05:15:14*yglukhov quit (Ping timeout: 265 seconds)
05:29:39*nc-x joined #nim
05:30:30nc-xOn latest devel `nimble install c2nim` fails with `.nimble\pkgs\compiler-#head\compiler\ast.nim(13, 46) Error: cannot open 'securehash'`
05:35:03*dddddd quit (Read error: Connection reset by peer)
05:40:01*nc-x quit (Quit: Page closed)
06:04:24*nc-x joined #nim
06:10:10nc-xdoes `nim check` do the checking only on the desktop platforms and not on the js target? I ask this because I was going through https://nim-lang.org/araq/karax.html and using the event handlers, vscode goes red.
06:11:05nc-xDoing `nim check filename.nim` gives **lots and lots** of errors, where the first one is `kdom.nim(14, 10) Error: This module only works on the JavaScript platform`
06:13:39*yglukhov joined #nim
06:14:51nc-xAll the errors -> https://gist.github.com/anonymous/f7de8cc14e99363cd53a04ec267585fb
06:15:25nc-x(I am on devel, if that matters)
06:17:28*nc-x quit (Quit: Page closed)
06:18:05*yglukhov quit (Ping timeout: 256 seconds)
06:37:20*yglukhov joined #nim
06:41:28*yglukhov quit (Ping timeout: 240 seconds)
06:44:09*vlad1777d quit (Ping timeout: 272 seconds)
07:09:43*nsf joined #nim
07:18:10*skrylar joined #nim
07:18:37skrylaroi oi.
07:26:44*yglukhov joined #nim
07:31:11*yglukhov quit (Ping timeout: 248 seconds)
07:52:31*natrys joined #nim
07:59:32*lastjedi joined #nim
08:05:59*vlad1777d joined #nim
08:08:35*lastjedi quit (Ping timeout: 256 seconds)
08:21:55*nsf quit (Quit: WeeChat 1.9.1)
08:25:44radagastIs there something like the comma operator of C++ in nim? Just out of curiosity. For example, while std::cin >> x, x < 10 doThis()
08:25:49*claudiuinberlin joined #nim
08:26:54*xkapastel quit (Quit: Connection closed for inactivity)
08:27:21radagastI meant while (std::cin >> x, x < 10) doThis();
08:29:00*yglukhov joined #nim
08:29:38*Arrrr joined #nim
08:35:49*Arrrr quit (Ping timeout: 265 seconds)
08:36:05skrylarradagast, is that just sugar for 'and'?
08:38:01*yglukhov quit (Remote host closed the connection)
08:48:21Amun_Rait's like ";" making a sequence point
08:48:48Amun_Raif ( foo ) x = 1, y = 2;
08:49:09radagast^ yes, this. https://www.tutorialspoint.com/cplusplus/cpp_comma_operator.htm
08:51:11skrylari don't do c++11 stuff. but no i don't think nim lets you combine things like that
08:53:57skrylarI do kind of miss iterators from Rust. they had a nice way of doing that
08:55:34radagastskrylar: For example?
08:57:42skrylarfrom what i remember of rust 0.8, it was mostly a chain of functions. you could do stuff like "for x in b.items().take(5)" which gave you an iterator for items, then wrapped it in another iterator that would only return the first five
08:58:41*Arrrr joined #nim
08:58:41*Arrrr quit (Changing host)
08:58:41*Arrrr joined #nim
08:59:13FromGitter<mratsim> Check @alehander42 zero_functional
08:59:45FromGitter<mratsim> https://github.com/alehander42/zero-functional
09:00:53FromGitter<mratsim> I've also implemented mine for project Euler but it's using closure iterators: https://github.com/mratsim/nim-projecteuler/blob/master/src/lib/functional.nim
09:01:55FromGitter<mratsim> Example usage: https://github.com/mratsim/nim-projecteuler/blob/master/src/pe002_even_fibonacci_numbers.nim
09:03:27*gmpreussner quit (Ping timeout: 248 seconds)
09:04:10radagastIn system.countup(a, b:T, step :int), I really wonder why they chose `a` and `b` instead of something like `start` and `stop`. :(
09:04:49*gmpreussner joined #nim
09:06:29radagastAnd it looks like you can't go in reverse order with a > b and step < 0
09:06:51radagastI guess it wouldn't be count"up" :D
09:09:56FromGitter<Varriount> radagast: araq likes short variable names
09:09:57skrylari do find it obnoxious that 6..2 doesn't work
09:10:25skrylarthere is probably a reason in there about not wanting to use max() and swap steps
09:14:05*gokr joined #nim
09:25:59arecaceaeflyx: would it be possible/feasible to make nimyaml loading support compile-time?
09:29:21skrylarwell, one thing you can "always" do is build a tool that does some arbitrary step, and then staticexec the result back to nim
09:29:25*lastjedi joined #nim
09:29:47arecaceaeskrylar: want all my stuff in one binary
09:30:00skrylarstaticexec runs at compile time
09:30:13Arrrrradagast: you should suggest a change or request a pull to change that
09:30:21arecaceaeskrylar: ah that might be an idea, thanks
09:30:25Arrrrsometimes things are like that for no reason
09:30:29skrylarif you do things like somevar = staticread(...) then the file is read at compile time as a constant
09:31:53flyxarecaceae: main problem with compile-time support was problems with ref types last time I tried it. I believe some bugs have been fixed since then
09:32:12radagastArrrr: There are chances of major code breakage though. For example, existing codes can pass arguments like this: for i in countup(a = 5, b = 80, step = 10). I don't want to get insulted by Araq :D
09:32:44arecaceaeflyx: staticReading and then loading atm. gives me 'cannot evaluate at compile time: serializationTagLibrary'
09:32:49flyxarecaceae: however, afaik I use some cast operations which are simply not supported
09:33:13ArrrrA lot of things are breaking in this v cersion
09:33:13arecaceaeflyx: I see
09:33:13arecaceaeflyx: so I assume its an involved thing if possible at all
09:33:44skrylarthats why i chimed in with staticexec :<
09:33:47*deathstar joined #nim
09:34:03skrylarif the need is to transform that yaml to create code, it's always an option.
09:34:22skrylaras is doing the generation in a build step and including (yes theres textual inclusion, weirdly enough) the result
09:34:27flyxarecaceae: yes. the error you get is not the one hard to handle, it is simply caused by `serializationTagLibrary` being a runtime global variable.
09:34:48arecaceaeflyx: ah I see
09:35:48*lastjedi quit (Ping timeout: 240 seconds)
09:36:11flyxarecaceae: I think it *could* be possible supporting compile-time by dropping support for anchors / aliases, because then I would not need ref types.
09:36:19flyxbut that would need to be implemented.
09:36:31arecaceaeflyx: interesting
09:37:40flyxit also depends on stdlibs being availble at compile-time. I don't know their status. libs that may cause problems include streams and lexbase.
09:38:45*nsf joined #nim
09:40:22skrylarif it was a high enough priority you could use a technique like flatbuffers
09:40:42*lastjedi joined #nim
09:40:43skrylarwhere you read everything in to a big blob and index back in to it; gets rid of refs, but its less pretty
09:40:58arecaceaeyeah I noticed streams not being compile-time ready before
09:41:11skrylarstaticread and staticexec are magic iirc
09:43:06FromGitter<alehander42> @Araq, @dom96 : any additional work needed from me for https://github.com/nim-lang/Nim/pull/6841 ?
09:43:27*deathstar quit (Ping timeout: 248 seconds)
09:44:49flyxwell I can already handle reading in strings. I think even without lexbase iirc. however, I use a cast to dispatch between direct string reading and using lexbase for Streams
09:45:19flyxI did that to support the JS target which also lacks streams support
09:48:11flyxso to sum up: compile-time support in NimYAML will not happen in the forseeable future.
09:48:33flyxbut is possible to be implemented *somewhen*
09:48:56skrylar"Some day after never"? :)
09:51:10*Trustable joined #nim
09:51:36flyxwell besides fixing small bugs and adding features that only need a few lines, I do not plan to work on it before I got YAML 1.3 finished with ingy
09:51:50Araqalehander42: More docs :-)
09:52:58flyxskrylar: http://geek-and-poke.com/geekandpoke/2017/2/5/developers-dictionary
10:04:39skrylarheh
10:05:06skrylarthere were old political memes to the tune of "<person> 20-never." which i mutated in to "some day after never"
10:05:18skrylarthere was also "a tiny forever"
10:05:39*lastjedi quit (Remote host closed the connection)
10:05:42skrylarthough valve time is more known :)
10:12:31FromGitter<alehander42> @Araq I guess they are autogenerated from inline docs in the module, right ?
10:14:14Araqyou also need to add it to lib.rst and website.ini
10:25:42FromGitter<mratsim> Maybe we need something similar to valve time for Nim https://developer.valvesoftware.com/wiki/Valve_Time. aka “1.0 is just around the corner”
10:27:30*nsf quit (Quit: WeeChat 1.9.1)
10:28:53*yglukhov joined #nim
10:32:47*_RPG_ quit (Quit: Leaving)
10:33:23ArrrrWhat would be the most popular project written in nim? compiler aside.
10:33:31*marenz__ joined #nim
10:34:14skrylarthere was that one group that was looking at writing a cryptocoin wallet in nim some time ago
10:36:17FromGitter<mratsim> Karax, Reel Valley, sequtils (:D)?
10:36:46FromGitter<mratsim> Neverwinter Nights also has the potential to be huge: https://github.com/niv/neverwinter.nim
10:38:02FromGitter<mratsim> and this one: https://github.com/niv/neverwinter_utils.nim
10:38:41skrylarthose things are still going?
10:38:51skrylari was around for the heyday of online worlds for NWN1 but never really.. participated
10:38:56skrylari think its dwindled since :(
10:38:57FromGitter<mratsim> last update to NWN was 6 days ago
10:39:16FromGitter<mratsim> Beamdog is working to get a new edition out
10:39:24FromGitter<mratsim> and tooling will be done in Nim
10:39:29skrylari had the original box with the cloth map
10:39:45skrylarnever finished the game tho :(
10:39:50FromGitter<mratsim> I think I still have the NWN1 trailer in .asf :P
10:40:15FromGitter<mratsim> I didn’t like the campaign (spoiled by BG2) but the map/campaign creation tools were awesome
10:41:15ArrrrThat's the same people say about Skyrim and its mods
10:41:47skrylari had nwn2 as well, but the XP penalty on drow pissed me off too much
10:41:57FromGitter<mratsim> https://www.beamdog.com/products/neverwinter-nights-enhanced-edition
10:41:59skrylarDid try to co-op NWN1 once, friends have since left though
10:43:04FromGitter<mratsim> NWN2 was too much action, not enough RPG but I liked the class/XP/leveling and customization you could do.
10:43:28FromGitter<mratsim> (Not anywhere near Path of Exile but well …)
10:45:04skrylarwell jenkins seems simple enough
10:47:26skrylarnow to figure out how to sort 'latest stables' and crap
10:49:05skrylartrying to set up a rig to make sure the sk* packages on nimble don't break with new nim releases
10:51:42yglukhovanyone knows whats the replacement for securehash now that its gone?
10:51:43FromGitter<mratsim> well 0.18 is bound to break a lot of packages, with the BackwardsIndex, Heteregeneous slice and I caught another strange macro issue here: https://github.com/xomachine/NESM/issues/5
10:52:01*yglukhov quit (Remote host closed the connection)
10:54:10skrylarsecurehash is gone?
10:54:18skrylari mean it wasn't secure but SHA1 is still useful
11:04:10*yglukhov joined #nim
11:05:07yglukhovmratsim: yeah, getType* did break some things for me as well
11:06:20Arrrri want pagma .public. that makes every field in an object public. For object variants is such a pain
11:06:24yglukhovskrylar: yeah securehash is not in stdlib anymore.
11:15:24*miran joined #nim
11:18:23*gokr quit (Ping timeout: 272 seconds)
11:24:15skrylarnow to figure out how to build nim from source
11:25:07*kunev quit (Ping timeout: 255 seconds)
11:26:10*kunev joined #nim
11:41:07*nsf joined #nim
11:49:01*natrys quit (Ping timeout: 256 seconds)
11:50:21skrylarwell that wasn't painful at all. good job jenkins
11:56:23*foo_ quit (Ping timeout: 272 seconds)
11:59:06*solitudesf quit (Quit: solitudesf)
12:01:01*endragor quit (Remote host closed the connection)
12:01:28*endragor joined #nim
12:05:48*endragor quit (Ping timeout: 240 seconds)
12:18:13*Vladar joined #nim
12:22:20*solitudesf joined #nim
12:23:29*yglukhov quit (Remote host closed the connection)
12:25:41*qih quit (Quit: qih)
12:26:30*yglukhov joined #nim
12:28:28*solitudesf quit (Quit: solitudesf)
12:29:37*Arrrr quit (Read error: Connection reset by peer)
12:29:52miranwhen using iterators, is there something like python's next() which would return (yield) the next value from the iterator?
12:30:32*solitudesf joined #nim
12:30:43miranbasically, using iterators outside some for loop
12:31:28skrylarseems to depend on the type of iterator it is https://nim-by-example.github.io/for_iterators/
12:32:14radagastI want to pass a variable number of codeblocks and an integer to a template. How do I do that?
12:32:58radagasthttps://play.nim-lang.org/?gist=b8557462959d61baad8fe7e664566993
12:34:16skrylarput the integer first and use varargs[untyped] iirc
12:34:45skrylarthat ':' ought to be 'do:'
12:34:55miranskrylar: i'm trying with closure iterators. i'll try some more i guess....
12:35:54skrylarmiran, according to that site you have to just use a while loop and call the closure iterator when you want a new value, so it seems allowed for *those*
12:36:04skrylarbut not the inline ones. hm
12:38:09radagastskrylar: can't get enything to compile. https://play.nim-lang.org/?gist=244310017d15180bf5821a84944083fd
12:38:15radagastHow do I use it?
12:40:38radagastHmm. The compiler is confused
12:41:03skrylari'm not sure why you want to accept multiple blocks in the first place
12:42:36radagastI'm learning how to use it. The do notation in the manual is less beginner friendly for me :(
12:43:22skrylari have had luck with a single untyped at the end, and using do, so there is code like "cobweb.dependent 'some variable' do: ..."
12:45:18skrylari seem to remeber its possible to have multiple 'do's and i forget how it was done
12:54:21*vlad1777d quit (Ping timeout: 264 seconds)
12:54:27*yglukhov quit (Remote host closed the connection)
12:56:10radagastIt's definately possible. I jsut wanted to check out varargs
12:56:12radagasthttps://play.nim-lang.org/?gist=c67b8a2037b6107656229e77b37530c6
13:06:29FromGitter<mratsim> What is this @alehander42 https://github.com/alehander42/viper Are you leaving Nim, the Nim police is onto you!
13:19:33FromGitter<alehander42> hahahaha, yes, I am.
13:20:11FromGitter<alehander42> unless araq implements the ethereum vm approach and assign a gas price to each primitive in the generated C code
13:23:21FromGitter<alehander42> let users pay for suboptimal code and recursion overflow *for real*
13:27:46*yglukhov joined #nim
13:44:27*natrys joined #nim
13:56:15*arnetheduck quit (Ping timeout: 248 seconds)
14:01:19*dddddd joined #nim
14:24:37Araqhuh?
14:25:40Araqah operator overloading is bad again
14:26:09Araqbecause I can write a createFile function that instead deletes the file ... oh wait
14:27:19FromGitter<ephja> we need more fun little easter eggs
14:27:49Araqdoes your simple '+' operator overflow, saturate, turns into bignums, trap or raise?
14:28:19FromGitter<ephja> why only one of those?
14:29:24Araqand if you want to allow more than one semantic, how do you do that? One builtin '+' and all the others get super shitty names instead?
14:29:35Araqwhat's simple about this?
14:29:47FromGitter<alehander42> A +operator that doesn't do a http request sometimes, is not a true operator
14:30:30AraqOverloading is far more simple than lacking it. even C99 introduced it.
14:31:16AraqThe only language that lacks it is Golang or something, this is not even discussed anymore anywhere
14:35:29Araqif you care about http requests, introduce an effect system.
14:36:21Araqdon't confuse syntax with semantics, don't confuse notation with typing rules
14:36:50Araqdon't confuse "readability" with "verbosity"
14:39:01Araqand please don't confuse "petty restrictions" with "language design".
14:41:20*endragor joined #nim
14:42:54Araqbtw when you disallow infinite loops and recursions you're not Turing complete
14:42:56Araq;-)
14:43:11FromGitter<mratsim> Did I miss the start of the operator overloading conversation?
14:43:30FromGitter<Quelklef> I am also confused
14:44:01skrylari just read a whitepaper where some insane people have made an auto-complete for 2d sketches
14:44:16Araqhttps://github.com/alehander42/viper I was referring to the bullet points in there
14:44:39FromGitter<alehander42> I was kidding..
14:44:49FromGitter<alehander42> The whole time
14:45:56FromGitter<alehander42> This language is super niche and actually the point of it is to be more decidable (and not Turing complete)
14:47:14FromGitter<Quelklef> @skrylar programming synthesis?
14:47:20FromGitter<mratsim> Well, imo ETH panicked due to Solidity-lang critical unsafety 1 month ago. The sane way would be to not create a new language from scratch but use an existing one
14:47:35FromGitter<alehander42> But again, it's only useful for smart contract s(cryptocurrency stuff) and not in general(they had a more general purpose language, but it was horrible and led to many bugs)
14:47:50skrylarquelklef, mratsim: http://www.liyiwei.org/papers/workflow-siga14/ my mind is officially blown
14:48:10Araqso write precisely what you gain from lacking Turing completeness
14:48:12FromGitter<mratsim> creating a new language from scratch, means reinventing years of bugs and accompanying bug fix
14:48:51Araqa couple of FP languages enforce total functions everywhere
14:49:12skrylarthey did another one that automatically tweens animations
14:49:17FromGitter<Quelklef> holy moly
14:49:18FromGitter<alehander42> Yep probably their readme is unclear, decidability helps them with proving stuff
14:49:27FromGitter<alehander42> Actually viper is old too
14:49:55FromGitter<alehander42> Yeah total functions are cool for some applications
14:50:06Araqpersonally I'm not convinced it's even the right problem description, so what if your loops can run forever, that's exactly what many systems need to do
14:50:30AraqI'd try to eliminate aliasing instead
14:50:51*endragor quit (Remote host closed the connection)
14:51:09FromGitter<Quelklef> @skrylar reminds me of 2.2 and 2.3 from https://rishabhmit.bitbucket.io/papers/program_synthesis_now.pdf
14:51:16Araqoh and btw saturated arithmetic is awesome, embrace it ;-)
14:51:40FromGitter<alehander42> Yep but the whole way ether contracts run is a bit weird
14:51:51FromGitter<mratsim> "make things harder if it deems fit to do so for the goal of increasing security.” —> well go makes generics harder and it creates an unmaintainable mess
14:52:23FromGitter<alehander42> For each evaluated opcode they add gas and gas adds to the price of a transaction
14:53:06FromGitter<alehander42> So an endless loop wouldn't be cool
14:53:28FromGitter<mratsim> Generics in go: https://qph.ec.quoracdn.net/main-qimg-dd2dc3bc72b058b85774ee804a521165
14:53:57FromGitter<alehander42> (basically ether contracts are not typical programs)
14:54:11Araqno, don't make things harder for security, make sane defaults
14:54:33Araqmake the right thing easy to use.
14:55:10FromGitter<ephja> @mratsim yeah you just need a decent editor and common snippets :p
14:57:36FromGitter<alehander42> Ok, but if I want to write a very specific dsl or system rules and be able to automatically proof stuff for them, limitations like that might be necessary
14:57:52FromGitter<alehander42> Again that doesn't apply for a general purpose languages as Nim
14:58:03FromGitter<mratsim> I guess it’s better to see viper as an Ethereum DSL
14:58:17skrylarquelklef that book is quite thick
14:58:19FromGitter<alehander42> Yep, not really a languages
14:58:48Araqmy fear is that it doesn't apply at all, but I'll shut up now and work on some bugs instead
14:59:30FromGitter<alehander42> Well you can solve the halting problem only for a non Turing complete language :D
14:59:32skrylarAraq, creating or fixing ;)
15:00:06Araqalehander42: no computer out there is a turing machine
15:00:32FromGitter<mratsim> semantics ...
15:00:46Araqthat "infinite memory" part creates problems to build
15:01:30skrylarquelklef: i have been pondering lately about how some spam filters were using winnow learning with sparse features, and then some psychology thing on symbol merging, and wondering if that same concept could be misappropriated to ex. look at code trees
15:01:33FromGitter<Quelklef> @skrylar yeah, I've stuck to the "Applications" section myself, lol
15:02:56skrylarnothing real concrete yet (sadly) but it feels close to what DQN was doing, but in a non-spooky-deep-net context
15:03:01FromGitter<Quelklef> @skrylar I'm not familar with winnow learning, but to do what with code?
15:03:59FromGitter<alehander42> @Araq I'll write a better example and I'll ask you about it
15:04:09FromGitter<alehander42> But I am going for a drink now ;(
15:04:25Araqshouldn't that be a ;) ?
15:04:27skrylarquelklef: its worth a google, winnowing is pretty simple.
15:05:15skrylarwhat seems odd is if you learn patterns like "? += ?" are good, then that sort of guides you towards a possible code path
15:05:24skrylarversus blindly vomiting opcodes around
15:05:45skrylarwhich is what genetic programming does :|
15:06:08*yglukhov quit (Remote host closed the connection)
15:06:26*yglukhov joined #nim
15:06:55*yglukhov quit (Remote host closed the connection)
15:07:14*yglukhov joined #nim
15:07:41FromGitter<Quelklef> (https://files.gitter.im/nim-lang/Nim/fMJy/image.png)
15:07:43*yglukhov quit (Remote host closed the connection)
15:07:47FromGitter<Quelklef> oops mb
15:08:07FromGitter<Quelklef> "Like the Perceptron Training Procedure discussed in the previous lectures, Winnow uses linear threshold functions as hypotheses and performs incremental updates to its current hypothesis. Unlike the Perceptron Training Procedure, Winnow uses multiplicative rather than additive updates." aight I can get behind this
15:08:25skrylaryes. its a boolean classifier
15:08:36skrylarwell technically the paper its from says its a means of removing irrelevant details
15:09:06*yglukhov joined #nim
15:09:17FromGitter<alehander42> As
15:09:18FromGitter<Quelklef> sure but
15:09:32*yglukhov quit (Remote host closed the connection)
15:09:40FromGitter<Quelklef> im familiar with Perceptrons in the context of ANNs which I can't really see being applied in this context
15:09:49skrylarah
15:10:04*yglukhov joined #nim
15:10:34FromGitter<alehander42> After the wine it will be ;)
15:10:34*yglukhov quit (Remote host closed the connection)
15:11:01skrylarquelklef: i'm just curious as of late if ANNs are a ruse and if so what else would someone use
15:11:13*yglukhov joined #nim
15:11:22*yglukhov quit (Remote host closed the connection)
15:11:40*yglukhov joined #nim
15:11:43FromGitter<Quelklef> a ruse?? how do you mean
15:12:04skrylarconsider baidu deep voice. they went through hell to get wavenet running in real time
15:12:09*yglukhov quit (Remote host closed the connection)
15:12:30skrylarand it does the same job as an HMM/HTM speech synthesizer, but manages to clog up exponentially more resources
15:12:45*yglukhov joined #nim
15:13:02FromGitter<Quelklef> NGL, I'm not familiar with wavenet nor HMM/HTM, but I get your point
15:13:17*yglukhov quit (Remote host closed the connection)
15:13:24FromGitter<Quelklef> the way I see it, sure, each individual problem may have a better solution than ANNs
15:13:38FromGitter<Quelklef> but the whole point of 'em is that they're so general
15:13:46FromGitter<Quelklef> (among other things)
15:13:50*yglukhov joined #nim
15:13:57skrylarthey're general if you're Google
15:14:18FromGitter<Quelklef> as in, we can apply them to a lot of problems
15:14:20*yglukhov quit (Remote host closed the connection)
15:14:33skrylarneural turing machines and neural gpus are fascinating papers
15:14:37*yglukhov joined #nim
15:14:59FromGitter<Quelklef> when you have a h̶a̶m̶m̶e̶r̶ ANN everything looks like a n̶a̶i̶l̶ issue to be solved with ANNs
15:15:07*yglukhov quit (Remote host closed the connection)
15:15:24skrylarmaybe. but my heart is still with genetic/CGP :(
15:15:25*yglukhov joined #nim
15:15:46FromGitter<Quelklef> I mean genetic's kinda the same thing innit
15:15:54*yglukhov quit (Remote host closed the connection)
15:16:20*vlad1777d joined #nim
15:16:31FromGitter<Quelklef> except for that you don't need test cases which is A+
15:16:33skrylardunno. i'll dredge up the link to O* after a nap
15:17:00skrylarsome Swedes made a symbol machine that was learning 1) Math and 2) Formulas by example and inferrence
15:17:01FromGitter<Quelklef> what not
15:17:16FromGitter<Quelklef> oy what
15:17:43skrylarit was learning patterns and applying them, and responded to training examples where it re-learned new symbol trees to obey examples
15:17:55skrylarreading that paper destroyed my faith in ANNs as a reasoning engine
15:18:08FromGitter<Quelklef> i meant more"oy what" as in "oy what the **"
15:18:13skrylarmaybe a useful component of one :\
15:18:31skrylaranyway done spamming the chat, food and sleep
15:18:36FromGitter<Quelklef> lol
15:18:55FromGitter<Quelklef> you come in here, blow my mind, and cop out
15:18:55FromGitter<Quelklef> smh
15:19:13*yglukhov_ joined #nim
15:19:42*yglukhov_ quit (Remote host closed the connection)
15:19:57*yglukhov joined #nim
15:20:29*yglukhov quit (Remote host closed the connection)
15:20:40*gokr joined #nim
15:20:47*yglukhov joined #nim
15:21:16*yglukhov quit (Remote host closed the connection)
15:21:30*yglukhov joined #nim
15:22:03*yglukhov quit (Remote host closed the connection)
15:22:20*yglukhov joined #nim
15:22:50*yglukhov quit (Remote host closed the connection)
15:23:08*yglukhov joined #nim
15:23:38*yglukhov quit (Remote host closed the connection)
15:24:14*yglukhov joined #nim
15:24:25*yglukhov quit (Remote host closed the connection)
15:24:40*yglukhov joined #nim
15:25:12*yglukhov quit (Remote host closed the connection)
15:25:19*gokr quit (Ping timeout: 248 seconds)
15:25:30*yglukhov joined #nim
15:25:59*yglukhov quit (Remote host closed the connection)
15:26:16*yglukhov joined #nim
15:26:46*yglukhov quit (Remote host closed the connection)
15:27:00*yglukhov joined #nim
15:27:33*yglukhov quit (Remote host closed the connection)
15:27:50*yglukhov joined #nim
15:28:20*yglukhov quit (Remote host closed the connection)
15:28:38*yglukhov joined #nim
15:29:08*yglukhov quit (Remote host closed the connection)
15:29:25*yglukhov joined #nim
15:29:55*yglukhov quit (Remote host closed the connection)
15:42:14FromGitter<mratsim> @yglukhov here is a bench to compare Nim vs Rust w.r.t. calls from Python: http://codethief.rocks/2017/04/16/Extend-Python-With-Rust.html
15:47:34*geocar quit (Quit: Connection closed for inactivity)
15:49:21*Trustable quit (Remote host closed the connection)
15:55:54*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:59:54*natrys quit (Quit: natrys)
16:06:39*yglukhov joined #nim
16:14:32planetis[m]is casting to float ie: float(someInt) prefereed over toFloat proc? I see the later produces different c code
16:24:50FromGitter<mratsim> toFloat proc?
16:25:04FromGitter<mratsim> float(someint) is not casting, it’s conversion
16:25:45FromGitter<mratsim> casting is interpreting the byte pattern as if it was another type.
16:26:42FromGitter<mratsim> 00000001 are different for float and int, you can check by doing `castfloat (1)`
16:28:15FromGitter<mratsim> I wasn’t aware of `toFloat`, I always use float(foo)
16:30:10*niv feels summoned
16:33:28miranexchanging two values directly (e.g. a, b = b, a) is not possible, right?
16:40:21FromGitter<SolitudeSF> `(a, b) = (b, a)`
16:53:33*yglukhov quit (Remote host closed the connection)
16:59:35FromGitter<Quelklef> I mean, you could write a macro/template if you just care about the syntax of it
16:59:51planetis[m]miran: use swap
17:00:00*skrylar quit (Remote host closed the connection)
17:00:54planetis[m]mratsim: toFloat produces code: (double) SomeInt
17:01:06planetis[m]while the other: (NF) SomeInt
17:01:47planetis[m]I wonder why that is and which one is recomened
17:03:39FromGitter<tim-st> Can a proc has a default int value like `proc test(v=1) = echo v` ?
17:05:43FromGitter<Quelklef> Does `proc test(int v = 1) = echo v` not work?
17:06:07FromGitter<tim-st> It works good, but `v=-1` doesn't work.
17:06:49FromGitter<Quelklef> I beg to differ (https://play.nim-lang.org/?gist=57ed8ab2a4805598616420d2711f5863)
17:07:47FromGitter<ephja> remove ': void' :p
17:07:50FromGitter<tim-st> Thanks, so I have to write the type for negative values
17:08:15FromGitter<Quelklef> @ephja I like them explicit types
17:08:55FromGitter<Quelklef> @Tim no, removing `: int` and `: void`, it still works for me. What is your code, exactly?
17:09:31FromGitter<tim-st> `proc test(v=-1) = echo v`
17:10:16FromGitter<Quelklef> You need a space after `=`
17:10:44*Snircle joined #nim
17:10:48FromGitter<Quelklef> Not sure why, I'm guessing maybe it parses `=-` as a single token causing issues?
17:10:53FromGitter<tim-st> @Quelklef Oh, ok^^ thanks. It works now
17:17:20*yglukhov joined #nim
17:24:30*nsf quit (Quit: WeeChat 1.9.1)
17:27:27*endragor joined #nim
17:27:34*azy left #nim (#nim)
17:28:00*endragor quit (Remote host closed the connection)
17:37:58*endragor joined #nim
17:46:45*Arrrr joined #nim
17:46:45*Arrrr quit (Changing host)
17:46:45*Arrrr joined #nim
17:48:56*Trustable joined #nim
17:59:53*nsf joined #nim
18:07:55miranAraq: i get an error here: https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sets.nim#L405
18:08:10miransets.nim(415, 11) Error: attempting to call undeclared routine: 'addQuoted'
18:10:39*MJCaley joined #nim
18:12:15*endragor quit (Remote host closed the connection)
18:23:46*SenasOzys quit (Ping timeout: 260 seconds)
18:33:47*lastjedi joined #nim
18:37:49*Trustable quit (Remote host closed the connection)
18:39:07*Trustable joined #nim
18:39:53planetis[m]works for me do you have any code?
18:44:03miranplanetis[m]: i just tried to run that file in vscode
18:52:45miranAraq, planetis[m]: i found the problem! i needed to update nim devel version i had
18:54:15*Yardanico joined #nim
18:58:33*Arrrr quit (Ping timeout: 256 seconds)
19:14:10Yardanicowhat "mman.h" is used for in Nim? I was able to compile Nim on Minoca os with Haiku profile (but with linker flags as in linux), so I want to know where this is set for haiku
19:14:31YardanicoI mean "sh build.sh --os linux" fails because MAP_POPULATE isn't defined
19:14:44Yardanicobut with modified haiku entry in build.sh it successfully compiles and runs
19:16:37Yardanicowell it can't compile other programs because it uses linker flags for haiku
19:17:24*deathstar joined #nim
19:19:44Yardanicominoca os is surprisingly lightweight (9mb ram) and it's able to compile Nim successfully (it has its own package manager :P) 0_0.
19:20:08*lastjedi quit (Ping timeout: 240 seconds)
19:21:51Yardanicooh wait I actually changed nim.cfg and it's now able to compile koch
19:28:01*MJCaley quit (Quit: MJCaley)
19:28:37*lastjedi joined #nim
19:31:28*deathstar quit (Ping timeout: 240 seconds)
19:38:20*astronavt joined #nim
19:38:20*astronavt quit (Client Quit)
19:38:38*astronavt joined #nim
19:38:38*astronavt quit (Remote host closed the connection)
19:44:58*SenasOzys joined #nim
19:45:39*clonne101_ joined #nim
19:52:19*Jesin joined #nim
19:55:38*Trustable quit (Remote host closed the connection)
19:59:30*clonne101_ quit (Quit: Leaving)
20:11:12*yglukhov quit (Remote host closed the connection)
20:22:35*SenasOzys quit (Remote host closed the connection)
20:23:45*yglukhov joined #nim
20:31:51*miran quit (Quit: Konversation terminated!)
20:56:36*SenasOzys joined #nim
21:00:17*lastjedi quit (Ping timeout: 248 seconds)
21:05:52*Trustable joined #nim
21:09:26*ahmed_ joined #nim
21:13:47*gokr joined #nim
21:17:51FromGitter<mratsim> Where did you even hear about this lol
21:20:56FromGitter<Yardanico> In reactos (windows compatible os) community lol
21:21:28FromGitter<Yardanico> In a post about monolithic vs micro kernels
21:26:00Yardanicothis post was a discussion about https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate
21:34:03*vlad1777d quit (Remote host closed the connection)
21:35:34*vlad1777d joined #nim
21:48:25federico3a little bit old
21:53:36Yardanicoyeah :P
22:06:02*yglukhov quit (Remote host closed the connection)
22:15:28*mostly-harmless joined #nim
22:19:00*ahmed_ quit (Quit: Leaving)
22:20:55*Yardanico quit (Read error: Connection reset by peer)
22:28:07*solitudesf quit (Ping timeout: 265 seconds)
22:28:22*xkapastel joined #nim
22:29:05*Trustable quit (Remote host closed the connection)
22:35:37*HM quit (Quit: Segmentation fault)
22:35:58*HM joined #nim
22:59:17*obadz quit (Quit: WeeChat 1.9.1)
23:01:02*obadz joined #nim
23:01:05*Vladar quit (Quit: Leaving)
23:18:27*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:35:12radagastHow can I know if I am using heap or a stack to store a perticular object? As far as I understand, `ref object` returns a reference and whenever you bind a var to a reference it becomes heap allocated. How far off am I?
23:42:23*Jesin quit (Ping timeout: 248 seconds)