00:01:15 | * | yglukhov joined #nim |
00:03:31 | dom96 | Writing their name should be enough |
00:04:21 | FromGitter | <kayabaNerve> I went back to an old project of mine |
00:04:39 | FromGitter | <kayabaNerve> Forget the command for compiling, can't check my history.... |
00:04:46 | qih | dom96 Are you highlighted? |
00:05:22 | dom96 | Yes, but I'm not on gitter |
00:05:25 | FromGitter | <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:35 | qih | Ah ty anyway |
00:05:45 | FromGitter | <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:52 | FromGitter | <kayabaNerve> qih: Just type @username |
00:06:21 | qih | @kayabaNerve Are you highlighted? |
00:06:24 | FromGitter | <kayabaNerve> Yes |
00:06:32 | qih | Excellent, ty peeps |
00:06:59 | FromGitter | <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:13 | FromGitter | <kayabaNerve> I don't mind adding my own =destroy if I can get some reference as to what it is |
00:07:32 | FromGitter | <kayabaNerve> And I haven't updated anything since then. (No gcc, Nim, Nimble, or package updates) |
00:08:00 | FromGitter | <kayabaNerve> I don't mind disabling the GC in problem areas if I can keep it system wide... |
00:08:26 | FromGitter | <kayabaNerve> Oh. Code itself. ⏎ ⏎ ``` var ⏎ sprites: seq[Sprite] = newSeq[Sprite](0)``` [https://gitter.im/nim-lang/Nim?at=5a3463fa232e79134d55d80a] |
00:09:35 | FromGitter | <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:35 | qih | See ya |
00:22:49 | * | qih quit (Quit: leaving) |
00:29:20 | * | qih joined #nim |
00:29:37 | FromGitter | <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:01 | FromGitter | <dustinlacewell> this sounds like golang all over again |
00:32:07 | FromGitter | <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:35 | FromGitter | <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:09 | FromGitter | <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:23 | FromGitter | <dustinlacewell> Option is not the only union that is useful |
00:47:19 | FromGitter | <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:46 | FromGitter | <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:03 | Araq | I was taught ML in university fwiw, there is no need to lecture me about sum types |
01:02:55 | Araq | there is no optimization of 'opt' that couldn't be done in Nim and Nim is not Golang, thanks. |
01:03:28 | FromGitter | <dustinlacewell> Classic Araq, taking offense the most extreme thing you didn’t say in the first place |
01:03:59 | FromGitter | <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:27 | FromGitter | <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:18 | Araq | all 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:41 | Araq | *to |
01:12:57 | * | yglukhov quit (Ping timeout: 264 seconds) |
01:18:57 | qih | @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:34 | FromGitter | <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:40 | FromGitter | <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:30 | nc-x | On 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:10 | nc-x | does `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:05 | nc-x | Doing `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:51 | nc-x | All the errors -> https://gist.github.com/anonymous/f7de8cc14e99363cd53a04ec267585fb |
06:15:25 | nc-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:37 | skrylar | oi 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:44 | radagast | Is 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:21 | radagast | I 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:05 | skrylar | radagast, is that just sugar for 'and'? |
08:38:01 | * | yglukhov quit (Remote host closed the connection) |
08:48:21 | Amun_Ra | it's like ";" making a sequence point |
08:48:48 | Amun_Ra | if ( foo ) x = 1, y = 2; |
08:49:09 | radagast | ^ yes, this. https://www.tutorialspoint.com/cplusplus/cpp_comma_operator.htm |
08:51:11 | skrylar | i don't do c++11 stuff. but no i don't think nim lets you combine things like that |
08:53:57 | skrylar | I do kind of miss iterators from Rust. they had a nice way of doing that |
08:55:34 | radagast | skrylar: For example? |
08:57:42 | skrylar | from 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:13 | FromGitter | <mratsim> Check @alehander42 zero_functional |
08:59:45 | FromGitter | <mratsim> https://github.com/alehander42/zero-functional |
09:00:53 | FromGitter | <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:55 | FromGitter | <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:10 | radagast | In 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:29 | radagast | And it looks like you can't go in reverse order with a > b and step < 0 |
09:06:51 | radagast | I guess it wouldn't be count"up" :D |
09:09:56 | FromGitter | <Varriount> radagast: araq likes short variable names |
09:09:57 | skrylar | i do find it obnoxious that 6..2 doesn't work |
09:10:25 | skrylar | there is probably a reason in there about not wanting to use max() and swap steps |
09:14:05 | * | gokr joined #nim |
09:25:59 | arecaceae | flyx: would it be possible/feasible to make nimyaml loading support compile-time? |
09:29:21 | skrylar | well, 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:47 | arecaceae | skrylar: want all my stuff in one binary |
09:30:00 | skrylar | staticexec runs at compile time |
09:30:13 | Arrrr | radagast: you should suggest a change or request a pull to change that |
09:30:21 | arecaceae | skrylar: ah that might be an idea, thanks |
09:30:25 | Arrrr | sometimes things are like that for no reason |
09:30:29 | skrylar | if you do things like somevar = staticread(...) then the file is read at compile time as a constant |
09:31:53 | flyx | arecaceae: 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:12 | radagast | Arrrr: 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:44 | arecaceae | flyx: staticReading and then loading atm. gives me 'cannot evaluate at compile time: serializationTagLibrary' |
09:32:49 | flyx | arecaceae: however, afaik I use some cast operations which are simply not supported |
09:33:13 | Arrrr | A lot of things are breaking in this v cersion |
09:33:13 | arecaceae | flyx: I see |
09:33:13 | arecaceae | flyx: so I assume its an involved thing if possible at all |
09:33:44 | skrylar | thats why i chimed in with staticexec :< |
09:33:47 | * | deathstar joined #nim |
09:34:03 | skrylar | if the need is to transform that yaml to create code, it's always an option. |
09:34:22 | skrylar | as is doing the generation in a build step and including (yes theres textual inclusion, weirdly enough) the result |
09:34:27 | flyx | arecaceae: 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:48 | arecaceae | flyx: ah I see |
09:35:48 | * | lastjedi quit (Ping timeout: 240 seconds) |
09:36:11 | flyx | arecaceae: 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:19 | flyx | but that would need to be implemented. |
09:36:31 | arecaceae | flyx: interesting |
09:37:40 | flyx | it 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:22 | skrylar | if it was a high enough priority you could use a technique like flatbuffers |
09:40:42 | * | lastjedi joined #nim |
09:40:43 | skrylar | where you read everything in to a big blob and index back in to it; gets rid of refs, but its less pretty |
09:40:58 | arecaceae | yeah I noticed streams not being compile-time ready before |
09:41:11 | skrylar | staticread and staticexec are magic iirc |
09:43:06 | FromGitter | <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:49 | flyx | well 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:19 | flyx | I did that to support the JS target which also lacks streams support |
09:48:11 | flyx | so to sum up: compile-time support in NimYAML will not happen in the forseeable future. |
09:48:33 | flyx | but is possible to be implemented *somewhen* |
09:48:56 | skrylar | "Some day after never"? :) |
09:51:10 | * | Trustable joined #nim |
09:51:36 | flyx | well 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:50 | Araq | alehander42: More docs :-) |
09:52:58 | flyx | skrylar: http://geek-and-poke.com/geekandpoke/2017/2/5/developers-dictionary |
10:04:39 | skrylar | heh |
10:05:06 | skrylar | there were old political memes to the tune of "<person> 20-never." which i mutated in to "some day after never" |
10:05:18 | skrylar | there was also "a tiny forever" |
10:05:39 | * | lastjedi quit (Remote host closed the connection) |
10:05:42 | skrylar | though valve time is more known :) |
10:12:31 | FromGitter | <alehander42> @Araq I guess they are autogenerated from inline docs in the module, right ? |
10:14:14 | Araq | you also need to add it to lib.rst and website.ini |
10:25:42 | FromGitter | <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:23 | Arrrr | What would be the most popular project written in nim? compiler aside. |
10:33:31 | * | marenz__ joined #nim |
10:34:14 | skrylar | there was that one group that was looking at writing a cryptocoin wallet in nim some time ago |
10:36:17 | FromGitter | <mratsim> Karax, Reel Valley, sequtils (:D)? |
10:36:46 | FromGitter | <mratsim> Neverwinter Nights also has the potential to be huge: https://github.com/niv/neverwinter.nim |
10:38:02 | FromGitter | <mratsim> and this one: https://github.com/niv/neverwinter_utils.nim |
10:38:41 | skrylar | those things are still going? |
10:38:51 | skrylar | i was around for the heyday of online worlds for NWN1 but never really.. participated |
10:38:56 | skrylar | i think its dwindled since :( |
10:38:57 | FromGitter | <mratsim> last update to NWN was 6 days ago |
10:39:16 | FromGitter | <mratsim> Beamdog is working to get a new edition out |
10:39:24 | FromGitter | <mratsim> and tooling will be done in Nim |
10:39:29 | skrylar | i had the original box with the cloth map |
10:39:45 | skrylar | never finished the game tho :( |
10:39:50 | FromGitter | <mratsim> I think I still have the NWN1 trailer in .asf :P |
10:40:15 | FromGitter | <mratsim> I didn’t like the campaign (spoiled by BG2) but the map/campaign creation tools were awesome |
10:41:15 | Arrrr | That's the same people say about Skyrim and its mods |
10:41:47 | skrylar | i had nwn2 as well, but the XP penalty on drow pissed me off too much |
10:41:57 | FromGitter | <mratsim> https://www.beamdog.com/products/neverwinter-nights-enhanced-edition |
10:41:59 | skrylar | Did try to co-op NWN1 once, friends have since left though |
10:43:04 | FromGitter | <mratsim> NWN2 was too much action, not enough RPG but I liked the class/XP/leveling and customization you could do. |
10:43:28 | FromGitter | <mratsim> (Not anywhere near Path of Exile but well …) |
10:45:04 | skrylar | well jenkins seems simple enough |
10:47:26 | skrylar | now to figure out how to sort 'latest stables' and crap |
10:49:05 | skrylar | trying to set up a rig to make sure the sk* packages on nimble don't break with new nim releases |
10:51:42 | yglukhov | anyone knows whats the replacement for securehash now that its gone? |
10:51:43 | FromGitter | <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:10 | skrylar | securehash is gone? |
10:54:18 | skrylar | i mean it wasn't secure but SHA1 is still useful |
11:04:10 | * | yglukhov joined #nim |
11:05:07 | yglukhov | mratsim: yeah, getType* did break some things for me as well |
11:06:20 | Arrrr | i want pagma .public. that makes every field in an object public. For object variants is such a pain |
11:06:24 | yglukhov | skrylar: yeah securehash is not in stdlib anymore. |
11:15:24 | * | miran joined #nim |
11:18:23 | * | gokr quit (Ping timeout: 272 seconds) |
11:24:15 | skrylar | now 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:21 | skrylar | well 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:52 | miran | when 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:43 | miran | basically, using iterators outside some for loop |
12:31:28 | skrylar | seems to depend on the type of iterator it is https://nim-by-example.github.io/for_iterators/ |
12:32:14 | radagast | I want to pass a variable number of codeblocks and an integer to a template. How do I do that? |
12:32:58 | radagast | https://play.nim-lang.org/?gist=b8557462959d61baad8fe7e664566993 |
12:34:16 | skrylar | put the integer first and use varargs[untyped] iirc |
12:34:45 | skrylar | that ':' ought to be 'do:' |
12:34:55 | miran | skrylar: i'm trying with closure iterators. i'll try some more i guess.... |
12:35:54 | skrylar | miran, 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:04 | skrylar | but not the inline ones. hm |
12:38:09 | radagast | skrylar: can't get enything to compile. https://play.nim-lang.org/?gist=244310017d15180bf5821a84944083fd |
12:38:15 | radagast | How do I use it? |
12:40:38 | radagast | Hmm. The compiler is confused |
12:41:03 | skrylar | i'm not sure why you want to accept multiple blocks in the first place |
12:42:36 | radagast | I'm learning how to use it. The do notation in the manual is less beginner friendly for me :( |
12:43:22 | skrylar | i 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:18 | skrylar | i 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:10 | radagast | It's definately possible. I jsut wanted to check out varargs |
12:56:12 | radagast | https://play.nim-lang.org/?gist=c67b8a2037b6107656229e77b37530c6 |
13:06:29 | FromGitter | <mratsim> What is this @alehander42 https://github.com/alehander42/viper Are you leaving Nim, the Nim police is onto you! |
13:19:33 | FromGitter | <alehander42> hahahaha, yes, I am. |
13:20:11 | FromGitter | <alehander42> unless araq implements the ethereum vm approach and assign a gas price to each primitive in the generated C code |
13:23:21 | FromGitter | <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:37 | Araq | huh? |
14:25:40 | Araq | ah operator overloading is bad again |
14:26:09 | Araq | because I can write a createFile function that instead deletes the file ... oh wait |
14:27:19 | FromGitter | <ephja> we need more fun little easter eggs |
14:27:49 | Araq | does your simple '+' operator overflow, saturate, turns into bignums, trap or raise? |
14:28:19 | FromGitter | <ephja> why only one of those? |
14:29:24 | Araq | and 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:35 | Araq | what's simple about this? |
14:29:47 | FromGitter | <alehander42> A +operator that doesn't do a http request sometimes, is not a true operator |
14:30:30 | Araq | Overloading is far more simple than lacking it. even C99 introduced it. |
14:31:16 | Araq | The only language that lacks it is Golang or something, this is not even discussed anymore anywhere |
14:35:29 | Araq | if you care about http requests, introduce an effect system. |
14:36:21 | Araq | don't confuse syntax with semantics, don't confuse notation with typing rules |
14:36:50 | Araq | don't confuse "readability" with "verbosity" |
14:39:01 | Araq | and please don't confuse "petty restrictions" with "language design". |
14:41:20 | * | endragor joined #nim |
14:42:54 | Araq | btw when you disallow infinite loops and recursions you're not Turing complete |
14:42:56 | Araq | ;-) |
14:43:11 | FromGitter | <mratsim> Did I miss the start of the operator overloading conversation? |
14:43:30 | FromGitter | <Quelklef> I am also confused |
14:44:01 | skrylar | i just read a whitepaper where some insane people have made an auto-complete for 2d sketches |
14:44:16 | Araq | https://github.com/alehander42/viper I was referring to the bullet points in there |
14:44:39 | FromGitter | <alehander42> I was kidding.. |
14:44:49 | FromGitter | <alehander42> The whole time |
14:45:56 | FromGitter | <alehander42> This language is super niche and actually the point of it is to be more decidable (and not Turing complete) |
14:47:14 | FromGitter | <Quelklef> @skrylar programming synthesis? |
14:47:20 | FromGitter | <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:35 | FromGitter | <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:50 | skrylar | quelklef, mratsim: http://www.liyiwei.org/papers/workflow-siga14/ my mind is officially blown |
14:48:10 | Araq | so write precisely what you gain from lacking Turing completeness |
14:48:12 | FromGitter | <mratsim> creating a new language from scratch, means reinventing years of bugs and accompanying bug fix |
14:48:51 | Araq | a couple of FP languages enforce total functions everywhere |
14:49:12 | skrylar | they did another one that automatically tweens animations |
14:49:17 | FromGitter | <Quelklef> holy moly |
14:49:18 | FromGitter | <alehander42> Yep probably their readme is unclear, decidability helps them with proving stuff |
14:49:27 | FromGitter | <alehander42> Actually viper is old too |
14:49:55 | FromGitter | <alehander42> Yeah total functions are cool for some applications |
14:50:06 | Araq | personally 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:30 | Araq | I'd try to eliminate aliasing instead |
14:50:51 | * | endragor quit (Remote host closed the connection) |
14:51:09 | FromGitter | <Quelklef> @skrylar reminds me of 2.2 and 2.3 from https://rishabhmit.bitbucket.io/papers/program_synthesis_now.pdf |
14:51:16 | Araq | oh and btw saturated arithmetic is awesome, embrace it ;-) |
14:51:40 | FromGitter | <alehander42> Yep but the whole way ether contracts run is a bit weird |
14:51:51 | FromGitter | <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:23 | FromGitter | <alehander42> For each evaluated opcode they add gas and gas adds to the price of a transaction |
14:53:06 | FromGitter | <alehander42> So an endless loop wouldn't be cool |
14:53:28 | FromGitter | <mratsim> Generics in go: https://qph.ec.quoracdn.net/main-qimg-dd2dc3bc72b058b85774ee804a521165 |
14:53:57 | FromGitter | <alehander42> (basically ether contracts are not typical programs) |
14:54:11 | Araq | no, don't make things harder for security, make sane defaults |
14:54:33 | Araq | make the right thing easy to use. |
14:55:10 | FromGitter | <ephja> @mratsim yeah you just need a decent editor and common snippets :p |
14:57:36 | FromGitter | <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:52 | FromGitter | <alehander42> Again that doesn't apply for a general purpose languages as Nim |
14:58:03 | FromGitter | <mratsim> I guess it’s better to see viper as an Ethereum DSL |
14:58:17 | skrylar | quelklef that book is quite thick |
14:58:19 | FromGitter | <alehander42> Yep, not really a languages |
14:58:48 | Araq | my fear is that it doesn't apply at all, but I'll shut up now and work on some bugs instead |
14:59:30 | FromGitter | <alehander42> Well you can solve the halting problem only for a non Turing complete language :D |
14:59:32 | skrylar | Araq, creating or fixing ;) |
15:00:06 | Araq | alehander42: no computer out there is a turing machine |
15:00:32 | FromGitter | <mratsim> semantics ... |
15:00:46 | Araq | that "infinite memory" part creates problems to build |
15:01:30 | skrylar | quelklef: 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:33 | FromGitter | <Quelklef> @skrylar yeah, I've stuck to the "Applications" section myself, lol |
15:02:56 | skrylar | nothing real concrete yet (sadly) but it feels close to what DQN was doing, but in a non-spooky-deep-net context |
15:03:01 | FromGitter | <Quelklef> @skrylar I'm not familar with winnow learning, but to do what with code? |
15:03:59 | FromGitter | <alehander42> @Araq I'll write a better example and I'll ask you about it |
15:04:09 | FromGitter | <alehander42> But I am going for a drink now ;( |
15:04:25 | Araq | shouldn't that be a ;) ? |
15:04:27 | skrylar | quelklef: its worth a google, winnowing is pretty simple. |
15:05:15 | skrylar | what seems odd is if you learn patterns like "? += ?" are good, then that sort of guides you towards a possible code path |
15:05:24 | skrylar | versus blindly vomiting opcodes around |
15:05:45 | skrylar | which 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:41 | FromGitter | <Quelklef> (https://files.gitter.im/nim-lang/Nim/fMJy/image.png) |
15:07:43 | * | yglukhov quit (Remote host closed the connection) |
15:07:47 | FromGitter | <Quelklef> oops mb |
15:08:07 | FromGitter | <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:25 | skrylar | yes. its a boolean classifier |
15:08:36 | skrylar | well technically the paper its from says its a means of removing irrelevant details |
15:09:06 | * | yglukhov joined #nim |
15:09:17 | FromGitter | <alehander42> As |
15:09:18 | FromGitter | <Quelklef> sure but |
15:09:32 | * | yglukhov quit (Remote host closed the connection) |
15:09:40 | FromGitter | <Quelklef> im familiar with Perceptrons in the context of ANNs which I can't really see being applied in this context |
15:09:49 | skrylar | ah |
15:10:04 | * | yglukhov joined #nim |
15:10:34 | FromGitter | <alehander42> After the wine it will be ;) |
15:10:34 | * | yglukhov quit (Remote host closed the connection) |
15:11:01 | skrylar | quelklef: 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:43 | FromGitter | <Quelklef> a ruse?? how do you mean |
15:12:04 | skrylar | consider 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:30 | skrylar | and 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:02 | FromGitter | <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:24 | FromGitter | <Quelklef> the way I see it, sure, each individual problem may have a better solution than ANNs |
15:13:38 | FromGitter | <Quelklef> but the whole point of 'em is that they're so general |
15:13:46 | FromGitter | <Quelklef> (among other things) |
15:13:50 | * | yglukhov joined #nim |
15:13:57 | skrylar | they're general if you're Google |
15:14:18 | FromGitter | <Quelklef> as in, we can apply them to a lot of problems |
15:14:20 | * | yglukhov quit (Remote host closed the connection) |
15:14:33 | skrylar | neural turing machines and neural gpus are fascinating papers |
15:14:37 | * | yglukhov joined #nim |
15:14:59 | FromGitter | <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:24 | skrylar | maybe. but my heart is still with genetic/CGP :( |
15:15:25 | * | yglukhov joined #nim |
15:15:46 | FromGitter | <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:31 | FromGitter | <Quelklef> except for that you don't need test cases which is A+ |
15:16:33 | skrylar | dunno. i'll dredge up the link to O* after a nap |
15:17:00 | skrylar | some Swedes made a symbol machine that was learning 1) Math and 2) Formulas by example and inferrence |
15:17:01 | FromGitter | <Quelklef> what not |
15:17:16 | FromGitter | <Quelklef> oy what |
15:17:43 | skrylar | it was learning patterns and applying them, and responded to training examples where it re-learned new symbol trees to obey examples |
15:17:55 | skrylar | reading that paper destroyed my faith in ANNs as a reasoning engine |
15:18:08 | FromGitter | <Quelklef> i meant more"oy what" as in "oy what the **" |
15:18:13 | skrylar | maybe a useful component of one :\ |
15:18:31 | skrylar | anyway done spamming the chat, food and sleep |
15:18:36 | FromGitter | <Quelklef> lol |
15:18:55 | FromGitter | <Quelklef> you come in here, blow my mind, and cop out |
15:18:55 | FromGitter | <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:14 | FromGitter | <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:32 | planetis[m] | is casting to float ie: float(someInt) prefereed over toFloat proc? I see the later produces different c code |
16:24:50 | FromGitter | <mratsim> toFloat proc? |
16:25:04 | FromGitter | <mratsim> float(someint) is not casting, it’s conversion |
16:25:45 | FromGitter | <mratsim> casting is interpreting the byte pattern as if it was another type. |
16:26:42 | FromGitter | <mratsim> 00000001 are different for float and int, you can check by doing `castfloat (1)` |
16:28:15 | FromGitter | <mratsim> I wasn’t aware of `toFloat`, I always use float(foo) |
16:30:10 | * | niv feels summoned |
16:33:28 | miran | exchanging two values directly (e.g. a, b = b, a) is not possible, right? |
16:40:21 | FromGitter | <SolitudeSF> `(a, b) = (b, a)` |
16:53:33 | * | yglukhov quit (Remote host closed the connection) |
16:59:35 | FromGitter | <Quelklef> I mean, you could write a macro/template if you just care about the syntax of it |
16:59:51 | planetis[m] | miran: use swap |
17:00:00 | * | skrylar quit (Remote host closed the connection) |
17:00:54 | planetis[m] | mratsim: toFloat produces code: (double) SomeInt |
17:01:06 | planetis[m] | while the other: (NF) SomeInt |
17:01:47 | planetis[m] | I wonder why that is and which one is recomened |
17:03:39 | FromGitter | <tim-st> Can a proc has a default int value like `proc test(v=1) = echo v` ? |
17:05:43 | FromGitter | <Quelklef> Does `proc test(int v = 1) = echo v` not work? |
17:06:07 | FromGitter | <tim-st> It works good, but `v=-1` doesn't work. |
17:06:49 | FromGitter | <Quelklef> I beg to differ (https://play.nim-lang.org/?gist=57ed8ab2a4805598616420d2711f5863) |
17:07:47 | FromGitter | <ephja> remove ': void' :p |
17:07:50 | FromGitter | <tim-st> Thanks, so I have to write the type for negative values |
17:08:15 | FromGitter | <Quelklef> @ephja I like them explicit types |
17:08:55 | FromGitter | <Quelklef> @Tim no, removing `: int` and `: void`, it still works for me. What is your code, exactly? |
17:09:31 | FromGitter | <tim-st> `proc test(v=-1) = echo v` |
17:10:16 | FromGitter | <Quelklef> You need a space after `=` |
17:10:44 | * | Snircle joined #nim |
17:10:48 | FromGitter | <Quelklef> Not sure why, I'm guessing maybe it parses `=-` as a single token causing issues? |
17:10:53 | FromGitter | <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:55 | miran | Araq: i get an error here: https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sets.nim#L405 |
18:08:10 | miran | sets.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:53 | planetis[m] | works for me do you have any code? |
18:44:03 | miran | planetis[m]: i just tried to run that file in vscode |
18:52:45 | miran | Araq, 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:10 | Yardanico | what "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:31 | Yardanico | I mean "sh build.sh --os linux" fails because MAP_POPULATE isn't defined |
19:14:44 | Yardanico | but with modified haiku entry in build.sh it successfully compiles and runs |
19:16:37 | Yardanico | well it can't compile other programs because it uses linker flags for haiku |
19:17:24 | * | deathstar joined #nim |
19:19:44 | Yardanico | minoca 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:51 | Yardanico | oh 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:51 | FromGitter | <mratsim> Where did you even hear about this lol |
21:20:56 | FromGitter | <Yardanico> In reactos (windows compatible os) community lol |
21:21:28 | FromGitter | <Yardanico> In a post about monolithic vs micro kernels |
21:26:00 | Yardanico | this 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:25 | federico3 | a little bit old |
21:53:36 | Yardanico | yeah :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:12 | radagast | How 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) |