<< 26-04-2017 >>

00:31:18*rauss joined #nim
00:35:25*vlad1777d_ quit (Quit: Leaving)
00:46:30*pigmej quit (Ping timeout: 264 seconds)
00:47:33*pigmej joined #nim
00:47:56*pigmej is now known as Guest42697
00:48:03*Guest42697 quit (Excess Flood)
00:48:11*pigmej_ joined #nim
01:16:39*pigmej_ is now known as pigmej
01:24:46*chemist69 quit (Ping timeout: 255 seconds)
01:26:00*jrenner001 joined #nim
01:26:25jrenner001Anyone know how to get YouCompleteMe working with any nim plugin for vim?
01:33:03*jrenner001 quit (Remote host closed the connection)
01:38:44*chemist69 joined #nim
01:42:17*zachcarter_ joined #nim
01:46:02*zachcarter quit (Ping timeout: 268 seconds)
01:46:02*zachcarter_ is now known as zachcarter
02:05:29*brson quit (Quit: leaving)
02:06:33*devted quit (Quit: Sleeping.)
02:34:37*askatasuna quit (Ping timeout: 240 seconds)
02:34:52*askatasuna joined #nim
02:41:08*libman quit (Quit: Connection closed for inactivity)
02:47:27*yglukhov joined #nim
02:48:38*zachcarter quit (Ping timeout: 260 seconds)
02:52:50*yglukhov quit (Ping timeout: 252 seconds)
02:56:18*zachcarter joined #nim
03:01:59zachcarterhrm
03:02:02zachcarterthis vdom thing is tripping me up
03:08:50zachcarterdidn’t realize I could create scripts elements with it too wtih karax
03:08:54zachcarterkarax is effing awesome :D
03:09:12ldleworkwhat is that
03:09:38zachcarterthe spa framework araq and euantor and some others built
03:10:02zachcarterhttp://162.243.192.65/
03:10:51zachcarterno js written whatsoever :)
03:19:45*krux02 quit (Remote host closed the connection)
03:21:18FromGitter<Varriount> zachcarter: How is it awesome? Forgive me, I know little of react. Could I see some of the source?
03:21:29zachcartersure
03:21:37zachcarterhttps://github.com/zacharycarter/nim-playground-frontend
03:21:50zachcarterI’m not sure if I’m doing everything correctly or not either
03:23:59ldleworkno dockerfile, can't run it
03:25:50*chemist69 quit (Ping timeout: 252 seconds)
03:26:08FromGitter<Varriount> zachcarter: The frontend seems to work well
03:26:21zachcarterthanks Varriount
03:28:10FromGitter<Varriount> zachcarter: Now all it needs are <blink> tags and some background music
03:28:18zachcarter:D
03:30:41*chemist69 joined #nim
04:02:07zachcarteradded a spinner to the submit button
04:02:11zachcarterhttp://162.243.192.65/
04:04:33zachcarterIdlework: to your point - I’m pretty sure getting docker to run inside of docker like I was trying to do is either not possible or difficult / beyond my abilities
04:04:39zachcarterI tried but i couldn’t get the daemon to start
04:05:55zachcarterI did however, do some awesome stuff with docker over the weekend
04:12:00zachcarterVarriount: care to see something curious related to some Nim code?
04:36:22FromGitter<Varriount> zachcarter: Sure
04:36:44zachcartermost of the details are here
04:36:45zachcarterhttps://github.com/yglukhov/sound/issues/17
04:36:49zachcarterit’s that issue with the sound library
04:37:01zachcarterfor some reason this one section of code executes way slower on windows than on linux / osx
04:38:20FromGitter<Varriount> zachcarter: My immediate suspicion is on stb_vorbis_get_samples_short_interleaved
04:38:26zachcarternope!
04:38:28zachcarterI benchmarked that
04:38:35zachcartersame execution time on both OS's
04:38:47zachcarterit seems to be the size of the buffer
04:39:04zachcarterI don’t understand why
04:39:26FromGitter<Varriount> zachcarter: How many times is the buffer being resized on Windows vs Linux
04:40:25zachcarterI’m not sure of that specifically I just know that it’s looping through that section of logic far more times on windows than on linux
04:40:58zachcarterso my guess would be a lot more
04:40:59*BennyElg quit (Remote host closed the connection)
04:41:41FromGitter<Varriount> How many channels are there on Windows, vs on Linux?
04:42:16FromGitter<Varriount> `let dataRead = ... * i.channels`
04:42:30zachcarteroooooo
04:42:32zachcartergood question
04:42:45zachcarterI didn’t think that would matter but let me check
04:46:15zachcarter2 on windows
04:47:01FromGitter<Varriount> That buffer is reallocated on each loop, which isn't a cheap operation.
04:47:27zachcarter2 on osx
04:47:53zachcarterI’m just wondering why it loops so many more times
04:48:17zachcarterI don’t even know why it’s reading this way
04:48:18zachcartertbh
04:49:28FromGitter<Varriount> I wish I had bootcamp or parallels on my Mac. :/
04:49:32*yglukhov joined #nim
04:49:45zachcarterI just use virtualbox
04:50:27FromGitter<Varriount> zachcarter: What are the actual values for `dataRead` on each system?
04:52:52zachcarterthey’re the same
04:52:58zachcarter32768
04:54:00*yglukhov quit (Ping timeout: 260 seconds)
04:54:22FromGitter<Varriount> That loop on windows is looping more?
04:54:28zachcarteryup
04:54:54FromGitter<Varriount> What.
04:55:31FromGitter<Varriount> Something fishy is going on.
04:55:35zachcarterI’m compiling with mingw
04:55:48zachcarteryeah I agree
04:55:55zachcarterI should compare the generated C
04:58:11zachcartermeh I dunno
04:58:57FromGitter<Varriount> Is c_realloc actually resizing things correctly?
04:59:37FromGitter<Varriount> Why is it using malloc and realloc anyway?
04:59:44zachcarterno idea
04:59:46FromGitter<Varriount> Nim has unsafe allocation functions
05:00:04zachcarterI didn’t write this code
05:00:18FromGitter<Varriount> Hrm.
05:00:31FromGitter<Varriount> zachcarter: Is there a test sample I could run on my Mac?
05:00:39zachcartersure
05:00:46FromGitter<Varriount> I know I won't encounter the problem, but I want to modify the code.
05:00:53zachcarterokay
05:00:57zachcarterlet me put up a gist
05:01:00zachcarterand I’ll link you to an ogg
05:01:52zachcarterso replace the content of sound.nim with - https://gist.github.com/zacharycarter/f814d9b7ce7f412a6ecb3398a63d9f07 and here’s the ogg - http://www.vorbis.com/music/Epoq-Lepidoptera.ogg
05:03:58FromGitter<Varriount> Epog of the Butterfly?
05:04:01FromGitter<Varriount> *Epoq
05:05:07zachcarterlol
05:05:17zachcarterjust some sample on vorbis.com
05:05:23zachcarternot really my type of music
05:05:31FromGitter<Varriount> zachcarter: What do you by replace? sound.nim contains the implementation.
05:06:19zachcarterhttps://github.com/yglukhov/sound/blob/master/sound/sound.nim this file
05:11:57FromGitter<Varriount> Any idea how big a "sample" is?
05:12:31zachcarternot sure
05:22:14zachcartergoing to head to sleep, have a good night
05:26:38FromGitter<Varriount> zachcarter: This looks like it's trying to buffer the entire vorbis file at once.
05:34:05*chemist69 quit (Ping timeout: 260 seconds)
05:36:31*chemist69 joined #nim
05:55:43*rauss quit (Quit: WeeChat 1.7)
06:09:05*chemist69 quit (Ping timeout: 260 seconds)
06:16:46*yglukhov joined #nim
06:23:40*yglukhov quit (Remote host closed the connection)
06:27:03*chemist69 joined #nim
06:35:14*BennyElg joined #nim
06:35:14*BennyElg quit (Remote host closed the connection)
06:35:22*BennyElg joined #nim
06:48:05*zachcarter quit (Quit: zachcarter)
06:49:57*nsf joined #nim
06:57:53*gokr joined #nim
07:04:29*Arrrr joined #nim
07:26:12*vlad1777d joined #nim
07:45:59*yglukhov joined #nim
07:46:03*vivus quit (Quit: Leaving)
07:50:12*Arrrr quit (Ping timeout: 260 seconds)
08:10:03euantorzachcarter: The Nim playground editor seems to work for me now. Not sure what you changed to fix it, but it worked :) I tried looking at the generated JS code for the app but it's really difficult to read. Normally in JS what we'd do to get around the issue you were having (and to get around a whole bunch of other possible issues because JS is crap) is use a
08:10:03euantorself executing anonymous function: http://markdalgleish.com/2011/03/self-executing-anonymous-functions/
08:11:22*Vladar joined #nim
08:12:39*couven92 joined #nim
08:17:26*Arrrr joined #nim
08:17:26*Arrrr quit (Changing host)
08:17:26*Arrrr joined #nim
08:25:40FromGitter<timeyyy> ls
08:32:10ArrrrAraq, now that you are fixing tuples https://pastebin.com/ZBZD7Zsr
08:32:43Araqthat's a regression I think :-)
08:33:57ArrrrYes, because before updating to today i didn't have this issue. I guess it was introduced after the `[]` overriding for tuples
08:37:04*rokups joined #nim
08:37:54FromGitter<Varriount> Euantor: maybe it's just me, but half the justification for self-executing anonymous functions seems to be for better minimification
08:38:21FromGitter<Varriount> Which will hopefully become obsolete with webassembly
08:38:28euantorBetter minification, and prevent pollution of the global namespace
08:38:42euantorBut yes, hopefully that will become obsolete eventually
08:39:17euantorIn the world of JS it's not uncommon to have 100+ packages. If all of them operated in the global anmespace, you'd have name clashes all the time
08:39:29euantor*namespace
08:40:17FromGitter<Varriount> Hm. I wonder if that will become a huge problem for Nim
08:40:25euantorI saw the other day (it might have been linked here) a guy had created packages to colour terminal output for node.js. He'd created aseparate package for each colour, so if you needed 3 colours you had 4 packages straight away (one for each colour + another they all depended upon)
08:40:55FromGitter<Varriount> euantor: Why separate packages?
08:41:05euantorvery good question
08:41:18euantorhe had a stupid response for it, I'm trying to find it again now
08:43:10euantorhttps://github.com/jonschlinkert/ansi-yellow
08:43:33euantorhttps://github.com/jonschlinkert?utf8=%E2%9C%93&tab=repositories&q=ansi&type=&language=
08:44:52FromGitter<Varriount> Good grief
08:45:14euantorYeah
08:45:37euantorI can't find the issue where he tried to justify it, it's on one of the many repositories
08:48:36ArrrrMaybe he wants the stars
08:50:01euantorHe's in the top 5 most downloaded projects on NPM, according to: https://gist.github.com/bcoe/dcc961b869bbf6685002
08:50:19euantorAs he points out here: https://github.com/jonschlinkert/maintainers-guide-to-staying-positive#preamble
08:52:20FromGitter<Varriount> Perhaps we should do that with Nim
08:52:43FromGitter<Varriount> Create hundreds of single-function repositories
08:56:08euantorI'd rather not ;)
08:56:48*bjz joined #nim
08:57:53ArrrrSo npm actually stands for "Noob's Programming Machine", that explains a lot. The top user has a lot of redundant packages such as "bin-version" and "bin-version-check" and "bin-version-check-cli"
09:00:14gokrThe js world is a ... well. Hard to describe. Kinda like an asylym or something. Some stuff is good, but you easily drown in it all.
09:01:35*PMunch joined #nim
09:04:12AraqArrrr: fixed
09:06:55dom96hello guys
09:07:42ArrrrI'll give it a test as soon as you update motherstream
09:12:16AraqArrrr: pushed it
09:13:06FromGitter<TiberiumPY> donator: there it is: https://github.com/jonschlinkert/ansi-green/issues/1#issuecomment-250623396
09:13:18FromGitter<TiberiumPY> *eunator
09:13:30FromGitter<TiberiumPY> *euantor
09:13:58euantorAh yes, thanks TiberiumPY :)
09:13:59FromGitter<TiberiumPY> (typing from the phone isn't the best thing in the world)
09:14:18euantorDoesn't help that my name is full of vowels ;)
09:16:05*Arrrr1 joined #nim
09:16:06*Arrrr quit (Disconnected by services)
09:16:10*Arrrr1 quit (Client Quit)
09:20:05*Arrrr joined #nim
09:20:17*couven92 quit (Read error: Connection reset by peer)
09:20:39ArrrrRegression fixed, everything is fire.
09:20:47*couven92 joined #nim
09:20:58*couven92 quit (Read error: Connection reset by peer)
09:21:26*couven92 joined #nim
09:30:02FromGitter<Varriount> Arrrr: I'll go call the fire department.
09:34:59*Tiberium joined #nim
10:03:39Araqping yglukhov, we need to talk about JS backtraces again
10:06:25yglukhovhey what about them?
10:06:27yglukhovAraq
10:06:59yglukhovbrb 10 mins
10:30:45Tiberiumlol, you can even use generic proc's to use something like "print_r" from PHP (just playing around)
10:32:10Tiberiumbtw, if I have "proc output(args: varargs[cstring]) {.importc: "echo"}", how to use it like that: output("Hello", "from", "Nim!") ? Because Nim compiles it to echo(array("Hello","from","Nim")) in PHP
10:32:40*Vladar quit (Quit: Leaving)
10:44:24Tiberiumah, nvm, figured it out. but anyway, it's better to use nim's builtin "echo" :)
10:44:29Tiberiumit acts the same as php's "echo"
10:44:52yglukhovAraq: so what about js?
10:45:49Araqyglukhov: never mind, I think it was just an ordinary JS codegen glitch
10:46:04yglukhovok
10:50:16PMunchHmm, http://ix.io/rQm
11:02:06*Sembei joined #nim
11:02:20*Snircle joined #nim
11:02:33*devted joined #nim
11:03:52*zachcarter joined #nim
11:04:55zachcarterAraq: I was being stupid yesterday and forgot you could add a script tag through the vdom
11:05:04zachcarternow http://162.243.192.65/ should load fine
11:06:26PMunchIs that a web-front for Nim?
11:06:46zachcarterit is
11:07:18zachcarterhttps://github.com/zacharycarter/nim-playground & https://github.com/zacharycarter/nim-playground-frontend
11:07:56zachcartereuantor ^ might be interested in the fix as well I’m reading over logs now
11:09:52Araqthis is so cool :-)
11:10:40dom96this is amazing
11:10:41ldleworkzachcarter: nice
11:10:49dom96and I love that you've separated it into a frontend and backend repos :)
11:10:54ldleworkNow we need autocomplete
11:10:55zachcarterthank you
11:10:57ldlework:D
11:11:00ldleworkand emacs bindings
11:11:18dom96now we need the ability to compile gist's
11:11:27ldleworkzachcarter: did you use docker?
11:11:29ldleworkjust curious
11:11:44dom96Perhaps 162.243.192.65/?gist=gistIdHere :)
11:11:44Tiberiumldlework, he did
11:11:56TiberiumAFAIK
11:12:02zachcarterdom96: I can do that
11:12:13zachcarteralso saving snippets might be nice
11:12:19zachcarterIdlework: yup!
11:12:26dom96I think you can piggy back to gist on that.
11:12:45dom96but then again, it would be handy
11:13:20dom96You might be able to add the ability to save to an anonymous gist fairly transparently though.
11:14:00zachcarteryeah
11:14:28TiberiumAlso - https://replit.canny.io/languages-requests/ we're close to Julia
11:14:55Tiberiumbut I think it take some time for them to actually start implementing Scala, Julia, and Nim
11:17:10zachcarterI tried to show the project to my boss at work and he didnt’ understand it
11:17:13PMunchHow do you do permissions and stuff?
11:17:42zachcarterPMunch : some permissions are set in the code
11:17:50zachcarterothers are set in the scripts
11:18:18zachcarteryou can configure the temporary directory to write to
11:18:46zachcarterand the service needs read rights in its own directory
11:20:23PMunchHmm, echo staticExec("whoami") returns root. Please tell me that's not right :P
11:20:36zachcarterPMunch it’s running inside a docker container
11:20:43euantorHa, I sent a message mentioning you earlier zachcarter just after you'd disconnected
11:20:46*Sembei quit (Ping timeout: 268 seconds)
11:20:46PMunchAh right
11:20:48zachcarterso do whatever you want
11:20:49zachcarter:P
11:20:50PMunchThat helps :P
11:21:00euantorTHe issue is fixed for me, and I was wondering what you'd done to get it fixed
11:21:02zachcarterah yeah it was late for me euantor
11:21:06dom96Shall I point play.nim-lang.org to your IP? :)
11:21:10dom96or should it be try.nim-lang.org?
11:21:32zachcarterhrm this is up to you but yes I think that’ d be wonderful!
11:21:46euantorI know it's been mentioned but the only thing I'd like to see is realtime update of the compiler status
11:21:55euantorPerhaps WebSockets would be the way to go for that?
11:22:06zachcarterI’m not sure how I’d do that
11:22:16dom96That seems like it way more trouble than it's worth :)
11:22:38zachcarterI’m restricting network access to the docker container
11:22:48dom96So which subdomain would you like?
11:22:57zachcarterwhatever you think is best dom96
11:23:06zachcarterI assumed play, but try is fine too
11:23:15ldleworkpaste.nim-lang.org
11:23:17Tiberiumto be honest, even rust doesn't have "stream compiler log" feature
11:23:22Tiberium(i mean rust playground_
11:23:39zachcartereuantor: to fix it I just used a script tag in the vdom instead of trying to fiddle with the body onload stuff
11:23:53ldleworkAlso is there no permanent host?
11:24:05zachcarterhttps://github.com/zacharycarter/nim-playground-frontend/blob/master/src/app.nim#L74
11:24:18zachcarterit’s hosted on digital ocean atm
11:24:19euantorThat would make sense actually, never thought of that
11:24:26zachcarterme either until last night :P
11:24:30dom96Both rust and go call it 'play'
11:24:32dom96so play it is
11:24:40zachcarteryay!
11:24:48euantornice!
11:25:06euantorWill it also have HTTPS support in that case?
11:25:12euantorJust to add another job to the list ;)
11:25:21zachcarterI’ll probably need the certs
11:25:24dom96https://play.nim-lang.org/
11:25:27zachcarterand I can set up https
11:25:29Tiberiumyay
11:25:32zachcarteroh wow
11:25:32Tiberiumit's HTTPS already
11:25:33Tiberiumlol
11:25:33zachcarterthat was fast
11:25:35zachcarter:D
11:25:36dom96CloudFlare takes care of that
11:25:43zachcartersweeeeet
11:25:47ldleworkzachcarter: did you use jwilder's nginx image?
11:25:49dom96but SSL between CloudFlare and your server would be nice too of course
11:26:02zachcarterIdlework: no, I didn’t use docker for deployment
11:26:05FromGitter<Varriount> zacharycarter: Isn't it possible for a submission to delete/replace the compiler?
11:26:09ldleworkoh I thought you said you did
11:26:21zachcarterno just for the code execution part
11:26:27ldleworkany reason?
11:26:28Tiberiumoh wait
11:26:33Tiberiumit doesn't work
11:26:36zachcarterVarriount: I suppose so but it’d just affect that docker container
11:26:38Tiberium"app.js:2083 Mixed Content: The page at 'https://play.nim-lang.org/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://162.243.192.65:3000/compile'. This request has been blocked; the content must be served over HTTPS."
11:26:50ldleworkchange your links to ://
11:26:53dom96D:
11:26:54euantoryeah, there's an absolute path hardcoded in the front end
11:27:00zachcarterokay I’ll change it to https
11:27:15zachcarterone sec
11:27:17euantorremove the IP altogether, you probably don't want to expose that
11:27:31zachcartersure
11:27:37ldleworkdon't change it to https, change it to the url form that will use the current schema
11:27:45ldleworkyeah
11:27:48zachcarterokay
11:27:54dom96lol, the Rust playground just accepts the code in the URL
11:27:54FromGitter<Varriount> zachcarter: I'll see if I can poke any holes in the sandbox.
11:28:00zachcarterawesome
11:28:07zachcarterit needs its run through
11:28:13dom96yeah, the IP should be hidden
11:28:22dom96CloudFlare will protect you from DDoS
11:28:38zachcarter://play.nim-lang.org:3000/compile
11:28:40zachcarterthat look good?
11:29:05zachcarterI guess I should make this configurable real quick
11:29:06ldleworkwell I can't remember if it uses the : but I think it does
11:29:11zachcarterokay
11:29:11TiberiumI think no
11:29:17ldlework/compile should work
11:29:27zachcarterwhat about the port?
11:29:28Tiberiummaybe you can just do same 80 port?
11:29:32Tiberiumsomehow
11:29:38ldlework/compile will use the same port
11:29:45zachcarterit doesn’t though atm
11:29:48zachcarterI’d have to update nginx too
11:29:54ldlework?
11:30:02Tiberiumldlework, currently compile uses 3000
11:30:08ldleworkoh I see
11:30:12dom96I don't think cloudflare will work with port 3000
11:30:18ldleworkbest way to do it is in nginx for sure!
11:30:26euantorYeah, I would update nginx to reverse proxy it
11:30:29zachcarterokay
11:30:35zachcarterI will fix these things, one moment
11:30:43ldleworkzachcarter: great work.
11:30:47ldleworkgood night
11:30:53zachcarterthanks, gn
11:31:06Tiberiumand next we must set up a favicon.ico and we're ready :)
11:32:54Tiberium"If `s` contains extra data, it will raising `JsonParsingError`." "raising" is correct here?
11:33:44euantor`it will raise`
11:34:20Tiberiumthere's a couple of comments like that in json parser
11:36:12FromGitter<Varriount> Tiberium: It should be 'raise', 'raising' is future-tense
11:36:30FromGitter<Varriount> English tenses are weird.
11:37:21PMunchHmm, I'm trying to install the nim-geocoding package but nimble complains that package names can't contain '-'
11:37:28Tiberiumyou can clone it locally
11:37:32Tiberiumrename it and install
11:37:37Tiberium(as a workaround)
11:37:41PMunchFair enough
11:37:49PMunchWonder if it still works :P
11:37:59PMunchRequires Nim 0.10.0 or up..
11:38:39FromGitter<Varriount> zachcarter: Might try running the Nim program through Google's closure compiler tool, to optimize and minify it.
11:39:06zachcarterhmm good idea
11:39:23FromGitter<andreaferretti> I get an error 521 on https://play.nim-lang.org/
11:39:34FromGitter<andreaferretti> and it seems to reload continuously
11:39:37Tiberiumhttps://github.com/nim-lang/Nim/pull/5758
11:40:02Tiberiumomg, and now we need to wait if tests will break because of comments :D
11:40:44Tiberiumandreaferretti: it doesn't work right now, but it will work if you go directly to the IP
11:41:01FromGitter<andreaferretti> yeah, I know
11:41:04FromGitter<Varriount> Tiberium: I could merge it in now. :D
11:41:14FromGitter<andreaferretti> but I read it was already working a few liens bove
11:42:08PMunchHmm, got this http://ix.io/rQE has SSL support been removed from httclient?
11:42:10Tiberiumsomeone said that https://play.nim-lang.org website was working (DNS and such)
11:42:20TiberiumPMunch, no
11:42:24TiberiumPMunch, you need to compile with -d:ssl
11:42:38TiberiumPMunch, nim c -d:ssl somefile.nim
11:42:50PMunchAh right
11:43:14Tiberiumhttps://github.com/nim-lang/Nim/pull/5750 I love this PR name
11:43:17PMunchOkay, now I'm getting some other error. Thanks :)
11:44:06zachcarterokay I fixed nginx
11:44:16zachcarterhttp://162.243.192.65 appears to work
11:44:25zachcarternot sure why play.nim-lang.org still isnt’ working
11:44:36zachcartercache maybe?
11:44:39FromGitter<Varriount> zachcarter: `import osproc;execCmd("/bin/bash -c \"rm -rf /\"")`
11:44:56Tiberiumzachcarter, "Mixed Content: The page at 'https://play.nim-lang.org/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://162.243.192.65:3000/compile'. This request has been blocked; the content must be served over HTTPS."
11:45:13Tiberiumyou need to serve compile endpoint over https too
11:45:16FromGitter<andreaferretti> I do not see such an error
11:45:18zachcarterTiberium: if you try http://162.243.192.65 that error should be gone
11:45:21FromGitter<andreaferretti> just a cloudflare error page
11:45:38Tiberiumzachcarter, I know that it works by direct IP
11:45:41Tiberiumbecause it's not https
11:45:52zachcarterI removed the hardcoded url
11:45:59zachcarterbut it’s acting like I didn't
11:46:07zachcarterVarriount: I should probably try to catch that
11:46:11Tiberiumcloudflare cache
11:46:20zachcarterTiberium: that would be my guess
11:46:25Tiberiumzachcarter, maybe you can overwrite some libraries like osproc?
11:46:29Tiberiumwith empty .nim files :)
11:46:57dom96zachcarter: I cleared the cache for you
11:47:01zachcarterthanks
11:47:19Tiberiumor maybe there's a way to restrict executing shell commands from executable?
11:47:46zachcarterbleh it’s still not working not sure I need to get ready for work but I’ll continue troubleshooting afterwards
11:48:05Tiberiumzachcarter, I think in the future you need to make "nim" compile binary files as user "nobody"
11:48:17Tiberiumso no one can damage docker image
11:48:50zachcarteroh it is working
11:48:55zachcarterhttps://play.nim-lang.org/
11:48:56FromGitter<andreaferretti> works for me now
11:49:01zachcarteryay!
11:49:10zachcarterTiberium: good idea
11:49:32Tiberiumworks for me too
11:49:35Tiberiumgood job!
11:49:35zachcarterI can do that right now actually
11:49:37zachcarterthe nobody thing
11:49:39FromGitter<Varriount> zachcarter: And run with as little privilege as possible
11:49:47FromGitter<Varriount> So I can't erase the entire iamge.
11:49:56zachcarterwhat happens when you erase the image
11:49:57zachcarterjust curious?
11:50:04FromGitter<Varriount> Want to find out?
11:50:11zachcartersure
11:50:14Tiberiumnothing, but your compile will not be accessible
11:50:20Tiberiumyou will need to recreate image
11:50:41dom96Can't you recreate the image each time?
11:50:53zachcarterI don’t even think it’s going to wipe out the image
11:50:57zachcarterI think it’s just going to wipe out the container
11:51:01TiberiumI think it would be slower, but I might be mistaken
11:51:58zachcarterrm: it is dangerous to operate recursively on '/'
11:51:59zachcarterrm: use --no-preserve-root to override this failsafe
11:52:04Tiberiumyes
11:52:11Tiberiumjust add "--no-preserve-root"
11:52:13Tiberiumand you're done :D
11:52:19zachcarterI did
11:52:21Tiberiumrm -rf / --no-preserve-roo
11:52:27Tiberiumlol
11:52:28zachcarterokay you just get empty logs
11:52:40zachcarterthe next time you run something
11:52:41zachcarterit works again
11:52:46zachcarterI’m actually fine with this
11:53:15zachcarterthe one security vulnerability I really worry about at the moment is someone injecting malicious JS / HTML
11:53:24zachcarternot sure if that’s possible or not but it might be
11:53:38FromGitter<Varriount> zachcarter: Are all submissions run in the same instance/image?
11:53:44zachcarternope!
11:53:50zachcarteran instance is created for every submission
11:53:56FromGitter<Varriount> Woah, really?
11:53:58zachcarteryup
11:54:00Tiberiumreally?
11:54:02zachcarterwith a 20s timeout
11:54:08FromGitter<Varriount> I didn't know docker was that fast.
11:54:16Tiberiumzachcarter, also don't forget to add guid for source files
11:54:21Tiberiumbecause for now I can "echo readFile("/usercode/in.nim")"
11:54:31Tiberiumah nvm
11:54:41euantoryeah, we talked about that yesterday
11:54:44Tiberiumso each code sample is being run in different containers?
11:54:46zachcarteryeah it has a guid now so submissions don’t step on each other
11:54:48zachcarteryup
11:54:58zachcarterevery request spins up its own docker instance
11:55:10FromGitter<Varriount> Which means one user can't poison a binary (such as GCC)
11:55:19FromGitter<Varriount> and affect other users
11:55:35zachcarteralthough things seem broken now
11:55:42zachcarteroh
11:55:46Tiberiummaybe we can try import osproc;execCmd(":(){ :|: & };:") ?
11:55:48zachcartercause I’m using chrome still :p
11:55:50Tiberiumit's a fork bomb
11:56:09TiberiumIt will slowdown entire machine as I think
11:56:33zachcarterjust that container :P
11:56:47TiberiumI'll try now :D
11:56:50zachcarterokay
11:56:57zachcarteryeah please beat on this thing
11:57:26Tiberiumlol
11:57:26Tiberiumsh: 1: Syntax error: Bad function name
11:57:31PMunchTiberium, you can also just use staticExec without osproc
11:58:13Tiberiumit hanged out
11:58:27Tiberiumok
11:59:01FromGitter<Varriount> zachcarter: Just in case, I would recommend hardening as much as possible outside the Docker containers
11:59:31FromGitter<Varriount> If someone does manage to escape the sandbox, it's best to make things hard
11:59:41zachcarteryeah I think I just need to harden the service file
11:59:48Tiberiumit reminds me of something
12:00:04zachcartergood suggestion Varriount: I’ll work on that today
12:00:29FromGitter<Varriount> zachcarter: What kind of network access so the containers have?
12:00:34zachcarternone
12:00:55FromGitter<Varriount> Ah good. No sending spam out.
12:01:14zachcarteryup!
12:02:32PMunchTiberium, http://ix.io/rQL
12:02:37PMunchRunning the fork-bomb :P
12:03:30PMunchThe container seems to abort after a short while though :P
12:03:55zachcarterthings ar eprobably broken
12:03:57zachcarteratm
12:04:01zachcarterI’m hardening things on the server
12:04:15Tiberiummaybe at the end of this week we can spread the word about this new service?
12:04:43FromGitter<Varriount> I wish we had a professional pen tester
12:06:26FromGitter<Varriount> zachcarter: You might also want to impose a limit on the amount of standard output read/transferred
12:06:44zachcarterI could do that
12:07:37Tiberiumok, question about nim. I want to have code like "vk.users.get(id=1)" and I want it to translate to api.callMethod("users.get", {"id":"1"})
12:07:43Tiberiumcan I do that with macros?
12:07:55zachcarterVarriount: I may be able to get a buddy at work to run a pen test for me
12:10:10*Vladar joined #nim
12:14:39*zachcarter quit (Quit: zachcarter)
12:24:28*sz0 quit (Quit: Connection closed for inactivity)
12:31:03*yglukhov quit (Remote host closed the connection)
12:32:30PMunchTiberium, don't see why not
12:32:36TiberiumPMunch, and then another thing
12:32:45Tiberiumhow can I produce code with await's ?
12:32:47Tiberiumfrom macro
12:32:52Tiberiumor template
12:33:41*yglukhov joined #nim
12:34:49PMunchWrite an example of the code you want to create and then run dumpTree: on it. Then you will see what you need to do to recreate it :)
12:35:25*Sentreen quit (Quit: WeeChat 1.4)
12:37:56*Sentreen joined #nim
12:40:02TiberiumPMunch, it's not that easy with await
12:41:15Tiberiumall "await" are required to be placed in async procs, but if I generate "await" in macro (which is not an async proc), Nim complains that it can't find "await"
12:41:44TiberiumError: undeclared identifier: 'await'
12:43:27Tiberiumso I want to generate 'await' identifier outside of async proc (but this identifier will be placed into async proc later)
12:43:53Tiberiumbecause async proc is generated by another macro
12:44:16Tiberiumyeah, there's a workaround: merge this two macros into one
12:45:24Tiberiumbut then it will look very messy
12:45:39PMunchHmm
12:45:41PMunchI see
12:45:54PMunchWhat about having a macro with sub-procedures
12:46:56PMunchWould that work?
12:47:06PMunchOr you could do something like what I did in wxnim
12:47:11PMunchhttps://github.com/PMunch/wxnim/blob/master/genui.nim
12:47:26PMunchHaving a intermediate format which is then later converted into code
12:51:06*fredrik92 joined #nim
12:51:20PMunchHmm, can I define a proc that returns a tuple or nil?
12:52:06TiberiumI think yes
12:52:22Tiberiumif you want to return "nil", just don't change "result" variable and just do "return"
12:53:47Tiberiumok, for now I'll use "await vk users.get()"
12:54:44*smt__ joined #nim
12:55:14PMunchThat would just return the default value wouldn't it
12:55:59PMunchYeah, that just returns a tuple with default values.
12:56:05TiberiumPMunch, ah, hmm
12:58:47*smt_ quit (Ping timeout: 260 seconds)
12:59:57*fredrik92 quit (Quit: Disconnecting)
13:03:55Tiberiumok, another question: how to convert everything to string in macro?
13:04:08TiberiumI want to construct a table
13:05:34*zachcarter joined #nim
13:06:45Tiberium(i mean nnkIntLit, nnkFloatLit
13:08:43*Sembei joined #nim
13:08:48dom96everything? `$` typically
13:09:27PMunchdom96, I think he meant how can he convert a nnkIntLit AST node to a string node
13:10:04Tiberiumyeah, for table construction
13:10:11dom96newStrLitNode($intNode) would be my guess
13:10:16*krux02 joined #nim
13:11:07AraqnewLit($x.intVal)
13:13:11Tiberiumthat worked
13:13:19Tiberiumthanks!
13:15:02*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:20:17arnetheduckAraq, what do you think about running detect.nim on the build servers and upload the generated files to github pages or something similar? that would make it easy to grab constants for tested platforms..
13:20:43*devted quit (Quit: Sleeping.)
13:20:59arnetheduckpoked around a little in travis, and it should be possible, though there's some access / auth stuff to set up
13:21:35demi-arnetheduck: i imagine to push to a github pages thing you just need an auth token
13:22:15arnetheduckyeah, and some magic in travis.yml
13:22:42Tiberiumyou can encode your auth key
13:23:33Tiberiumhttps://docs.travis-ci.com/user/deployment/releases/#Authenticating-with-an-Oauth-token there's an example for deploy
13:26:19*krux02 quit (Disconnected by services)
13:26:19*krux02- joined #nim
13:26:21*krux02- is now known as krux02
13:26:33*krux02 quit (Disconnected by services)
13:26:34*krux02- joined #nim
13:26:42*krux02 joined #nim
13:31:43*Sembei quit (Ping timeout: 240 seconds)
13:35:23*krux02 quit (Remote host closed the connection)
13:39:46Araqarnetheduck: I don't have an opinion yet but one option is to make koch.nim exec detect.nim on Nim installation time for the exotic platforms out there
13:40:11Araqthe build servers don't have to be touched, I can easily run detect.nim on the 3 OSes that are tested anyway
13:41:03Araqbut the proliferation of posix_os_cpu.nim combinations is a valid concern, it's ugly
13:46:49krux02-I recently tried to run Nim opengl on nixos, it just failed.
13:47:15krux02-the simple program "import opengl" already crashes
13:48:35dom96Araq: arnetheduck: Couldn't we somehow perform this detection at compile-time? Just a crazy idea, it probably would be far too messy.
13:49:28arnetheduckdom96, not without having a c compiler and c headers present, which sort of defeats the purpose
13:50:09dom96Ahh, then using koch to do it is out too.
13:51:09Araqno, why? koch can do it. built with the existing posix.nim
13:51:18arnetheduckAraq, I can't think of a way to get around that proliferation - either it will be in separate files or one giant file with when blocks - no real difference there really except I think it's easier to manage the files separately
13:51:25Araqand then koch patches the stdlib to use a more specialized posix.nim
13:51:57arnetheduckkoch could do it if the pre-genned file is not available, it's not a bad idea
13:52:58arnetheduckon the unmaintained platforms, the headers are needed anyway, might as well have koch do the work and have the constants as real nim constants
13:54:04arnetheduckthe point with letting the build servers do it is when a constant is added, then there's a stable source of detect runners
13:54:31Araqthe build servers start with a Nim installation
13:54:52AraqI mean with our "installation" instructions
13:55:15Araqpatch koch and the infrastructure takes care of the rest
13:57:39arnetheduckstill needs an upload somewhere so that they can be put in the main repo for "supported" platforms
13:59:49*couven92 quit (Quit: Client disconnecting)
13:59:52Araqnot really, everybody runs koch during the installation process
14:03:00*PMunch quit (Quit: leaving)
14:03:12*Sembei joined #nim
14:06:03dom96Doesn't this also require a C compiler and C headers to be present?
14:06:40arnetheduckhm, that's not bad actually for now - eventually pregenned files would allow us to avoid -devel dependencies, but it's a really good step forward, and the rest of the way is pretty long
14:07:07arnetheduckdom96, yes, but the constants are properly available to nim, instead of being fake vars
14:07:54dom96I don't understand why performing this detection at compile-time isn't ok, but using koch to do it is.
14:08:26arnetheducknow, it's possible to do something like posix.RTLD_LAZY = 42, and from nims point of view, that's perfectly ok
14:08:43arnetheduckthere's gonna be a compile error in the c compile stage later on, but...
14:09:05arnetheduckbeing vars, they can't be used for many things either that require a const (think ctfe)
14:09:30dom96To be clear, I'm talking about running the detect.nim script at compile time and using a macro to define these constants.
14:09:49dom96If we could cache the results it might work well.
14:13:01arnetheducksounds like a nightmare to debug.. and if you want to maintain that cache and check it for consistency, you'll incur quite a bit of compile time penalty as well
14:15:33arnetheduckit's important to remember that the c constants _never_ change - doing so would break so much stuff that it's virtually impossible to do
14:16:41*devted joined #nim
14:16:58*zachcarter quit (Quit: zachcarter)
14:17:58*zachcarter joined #nim
14:19:58arnetheduckhm, koch-at-install time won't work for cross compiling, or the tricks the build does to run parts of the compile with different -d:hostOs etc settings
14:20:44Araqthat is a very good point
14:21:12Araqthat pretty much means we need to have a static soup of const sections
14:22:31arnetheduckAraq, regarding the libc poc, would it be more digestible if it was a single libc.nim that ppl were to import? that's kind of the main point of that branch - single import or split-by-c-header doesn't really matter that much
14:24:07arnetheducksystem does that already sort of with ansi_c.nim, that's the model I want to have for the std lib as well, instead of relying on "posix"..
14:30:01*couven92 joined #nim
14:30:38AraqI don't even want the libc dependency
14:30:57Araqso why would we have a special wrapper for it?
14:32:42Araqwhat problem do you actually want to solve? posix is a standard we have to live with, libc is an implementation detail
14:32:49*zachcarter quit (Quit: zachcarter)
14:35:23*zachcarter joined #nim
14:35:30*zachcarter quit (Client Quit)
14:35:59*Vladar quit (Quit: Leaving)
14:36:47*zachcarter joined #nim
14:37:09FromGitter<battila7> Hey! Sorry for disturbing but this is the best place for asking. There is this RealWorld example app initiative of Thinkster. Developing backend and frontend from the same specs with different techs and languages. https://github.com/gothinkster/realworld
14:37:18*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:37:46FromGitter<battila7> It'd be a great opportunity for Nim and Jester to compare with other backends
14:37:53*zachcarter quit (Client Quit)
14:38:13FromGitter<battila7> Sadly I'm not experienced enough with Nim but thought that someone here might take the challenge
14:38:32*zachcarter joined #nim
14:43:36*BennyElg quit (Remote host closed the connection)
14:46:01Araqthanks, sounds useful
14:54:46*aedigix quit (Ping timeout: 255 seconds)
14:54:55arnetheducktwo problems to solve: posix and its lowest common denominator approach leads to it being poorly specified and therefore hard to import "correctly", and 2) on windows there's no posix, but there are a bunch of useful c library functions.. I suspect because of this, ppl are reluctant to import posix where it might not be so well defined or working.
14:55:18arnetheduckc is a standard too, there are so many to choose from ;)
14:55:33FromGitter<andreaferretti> @battila7 might be nice to showcase https://github.com/andreaferretti/rosencrantz
14:55:38FromGitter<andreaferretti> if I find the time
14:56:46arnetheducksaying that you want nim not to rely on c sounds optimistic at best - the c lib has a bunch of well optimized and tested code, and is a convenient gateway to the OS generally - not using it *as an implementation detail* seems like a waste
14:57:31*sz0 joined #nim
14:57:47*rauss joined #nim
14:59:00arnetheduckand effectively, it's no different from any other lib on the system, so having a thin wrapper that takes care of abi problems (and abi problems only) seems like a win, in clarity and ease of use for ppl implementing other parts of the nim std lib
15:00:55FromGitter<battila7> @andreaferretti This looks great! Do you have some experience on connecting it to some DB?
15:01:21arnetheduckyou already have that situation in the posix library - epoll.nim for example is not part of any posix standard or version, yet it sits in the posix folder, why?
15:01:24FromGitter<battila7> I'm still contemplating whether to give it a shot on the weekend
15:02:09dom96arnetheduck: indeed, the posix folder should be renamed to `unix`
15:02:47arnetheduckdom96, so where should "memcpy" be taken from? it's available on windows too
15:03:41dom96no idea
15:04:18arnetheduckthat's the point. if there's a libc library in wrappers, that's the one natural place to have it
15:04:53Tiberiuma little wrapper for tinyexpr (and my first nimble package) - https://github.com/TiberiumN/nim-mathexpr
15:05:37Tiberiumalso "nimble publish" is magic
15:05:38dom96arnetheduck: I'm happy with a libc module if that's what you're suggesting
15:05:43Tiberiumdoing all dirty work
15:07:14arnetheduckdom96, indeed, that's exactly what I'm suggesting: https://github.com/nim-lang/Nim/pull/5698
15:08:38arnetheduckthat branch goes a little further and has the libc module divided by c header, but that's really not necessary..
15:09:54*couven92 quit (Quit: Disconnecting)
15:10:45arnetheduckAraq, btw, https://github.com/nim-lang/Nim/pull/5678 has a test now.. it's a little ugly because the behaviour is different in unix and windows, but it's.. tricky to do any other way since there aren't really any signals in nim
15:10:51arnetheduck*in windows
15:10:54FromGitter<andreaferretti> @battila7 no, but I would use something like https://github.com/jlp765/db
15:11:33*willprice joined #nim
15:13:16*aedigix joined #nim
15:13:39arnetheduckand thanks for all the other merges, with them, nlvm can now compile with a clean upstream nim - managed to set up travis for it as well
15:15:51arnetheduckworks pretty well with markandsweep - can compile itself (still broken with default refcount gc though)
15:17:25*shashlick quit (Ping timeout: 260 seconds)
15:18:38FromGitter<battila7> @andreaferretti Thanks, nice one, I hope I'll have the time
15:19:07*shashlick joined #nim
15:29:49Araqmemcpy is not libc, it's a nice way to get efficient inline asm
15:32:17*McSoFake joined #nim
15:38:29zachcarterdom96: thinking about swapping out spectre for http://bulma.io/
15:38:50*Trustable joined #nim
15:39:38dom96zachcarter: I like it
15:39:54zachcartersame, will do that this evening
15:42:41FromGitter<battila7> @zachcarter bulma is pretty easy to work with and looks great, I definitely suggest it
15:43:11zachcarterbattila7: nice! good to hear
15:53:04*aziz joined #nim
15:59:58FromGitter<battila7> Opened an issue for Nim, gonna start working on it this weekend: https://github.com/gothinkster/realworld/issues/60
16:00:36FromGitter<battila7> I think I'll ask a lot here about different Nim patterns :smile:
16:10:45Tiberiumbattila7: I'm not an experienced dev in Nim, but IMO it's better to pick Jester if you're not experienced in Nim like me, because Jester is written by dom96, core Nim developer, so you can get help faster :) But it's up to you for choose framework
16:12:29dom96I would say that getting help from andreaferretti is pretty fast too :)
16:13:22Tiberiumalso, which library I can use for unpacking data from network protocol? In python there's https://docs.python.org/3/library/struct.html
16:15:09*Arrrr quit (Quit: Leaving.)
16:22:56*brson joined #nim
16:24:35dom96Might need to create a nimble package for htat
16:24:36dom96*thar
16:24:37dom96*that
16:32:31dom96aww yeah, got curl working with a progress bar :D
16:33:39*willprice94 joined #nim
16:35:12*willprice quit (Ping timeout: 260 seconds)
16:38:21*vlad1777d quit (Ping timeout: 268 seconds)
16:52:04*yglukhov quit (Remote host closed the connection)
16:56:23krux02-dom96: do you know wget, it has a progress bar by default ;)
16:57:19dom96I'd rather have a consistent progress bar on all OS'
16:58:38Tiberiumdom96, you're doing progress bar library for Nim? or just playing with curl?
16:58:56Tiberiumbecause there's cool and simple https://pypi.python.org/pypi/tqdm
16:59:03dom96I'm working on choosenim
16:59:11Tiberiumyou just wrap your iterable in tqdm() and it shows progress bar of this iterable
16:59:11dom96Creating a progress bar isn't that difficult
16:59:12*ftsf quit (Ping timeout: 260 seconds)
17:00:42demi-there is a handly module for doing this already
17:02:24Tiberiumdemi-, what is it?
17:03:15demi-`progressbar`
17:03:58Tiberiumdemi-, maybe `progress` ?
17:04:03demi-yeah
17:04:13demi-something like that ¯\_(ツ)_/¯
17:10:35*BennyElg joined #nim
17:10:56euantorYeah, my progress library does that: https://github.com/euantorano/progress.nim
17:11:11euantorAnd is fairly customisable to most needs
17:13:32FromGitter<battila7> @Tiberium Yup, it seems to be a more rookie-friendly choice
17:14:15FromGitter<battila7> I'm a bit worried about the separation of concerns and best practices
17:18:47CalinouBulma looks good, I forgot about it completely for some reason :P
17:22:54CalinouI should try it out, really
17:23:59*Sembei quit (Ping timeout: 268 seconds)
17:26:20Calinou112 KB minified (non-gzipped), 16 KB minified and gzipped
17:26:54Calinoulet's compare this to the latest Bootstrap 4 Git…
17:26:57dom96hrm, I remember seeing this piece of art that doubled as QR code a while back on Reddit or somewhere but I can't find.
17:27:06dom96Any chance anyone here stumbled upon the same thing and has a link?
17:27:06Calinoualso, hi dom96 :)
17:27:47FromGitter<battila7> @Calinou I've used it together with Mithril for an SPA and they've made a good team together
17:28:00Calinouyeah, the fact you have to implement JavaScript features yourself makes sense
17:28:09Calinouit's lower-level for sure, but this way you're sure there is no jQuery dependency
17:28:21Calinouso you can easily fit it in Angular, React, Vue.js, etc… projects, without loading jQuery
17:28:26Calinou(which is still big, and slow, to date)
17:28:48Calinoumost features seem to work without JavaScript anyway, but if eg. you want modals, you have to implement the class toggle yourself, it should be easy anyway
17:29:55*vivus joined #nim
17:31:46*TheLemonMan joined #nim
17:32:08CalinouBootstrap 4 is 140 KB minified, 20 KB minified and gzipped, so it's a bit larger, but this is only the CSS
17:32:40Calinouif you add the (pretty much required) JavaScript, you have to add 48 KB minified, 16 KB minified and gzipped
17:32:58Calinouoh, and you also need Tether.js anyway with Bootstrap 4… so that's even more size to add :)
17:33:06Calinouand jQuery of course
17:34:54*yglukhov joined #nim
17:35:05*vlad1777d joined #nim
17:36:42*rauss quit (Ping timeout: 240 seconds)
17:39:05*rauss joined #nim
17:39:20*yglukhov quit (Ping timeout: 260 seconds)
17:39:52FromGitter<battila7> That's gonna add up to a lot
17:40:25FromGitter<battila7> Have you checked Semantic? It is modularized pretty well so you can include only what's needed
17:44:25Calinouyeah, I've looked at Semantic UI
17:44:40Calinouthe full package is gigantic, so you definitely want to use only what you need (but unfortunately, it takes time to select packages, and to add/remove them as needed…)
17:44:48Calinouit seems highly targeted at Web apps, rather than just websites
17:45:16CalinouBulma has the advantage of having an usable (not too large) full package, not requiring jQuery or JavaScript, and being able to design both websites and Web apps
17:54:17FromGitter<battila7> Yeah, Semantic is a big gun for big things I think. But in the same time, quite fun to work with.
18:10:13euantorJust looked at that `tqdm` lib for Python, seems like a big library for something simple like a progress bar
18:11:14euantorIt runs a thread to monitor a progress bar
18:13:56Tiberiumeuantor, I think that most python libraries aren't made for speed, but for usability
18:14:06euantoryeah, it seems that way
18:17:15euantorit does have some nice features, though I'm not sure how much more I want to add to progress as it's meant to be simple
18:17:56zachcartergotta run to an appointment soon
18:18:03*zama quit (Remote host closed the connection)
18:18:03zachcarterbut I started playing with bulma
18:18:06zachcarterdom96: http://imgur.com/a/BnhCe
18:18:47*zama joined #nim
18:19:02euantorLooks good!
18:19:24zachcarterthanks
18:19:42zachcarteranyways be back in a bit
18:23:58*zachcarter quit (Ping timeout: 252 seconds)
18:24:03Tiberiumzachcarter, looks way cooler than other playgrounds
18:24:15Tiberium(i mean other languages)
18:28:51*yglukhov joined #nim
18:30:41*jrenner0001 joined #nim
18:37:57*zachcarter joined #nim
18:53:50*aziz quit (Remote host closed the connection)
18:56:13*zachcarter quit (Quit: zachcarter)
19:00:20*Matthias247 joined #nim
19:16:26federico3can I convert a typedesc to a string?
19:16:53krux02-there is a package you can import where you can acces the name
19:17:37krux02-https://nim-lang.org/docs/typetraits.html
19:17:51federico3tnx
20:03:55*Tiberium quit (Remote host closed the connection)
20:09:06krux02-my nim tetris has now animations yay
20:09:22krux02-very rudimentary, and not all animations, but the foundation is there
20:12:17*rokups quit (Quit: Connection closed for inactivity)
20:13:05dom96krux02-: ever played/heard of Frets on Fire?
20:13:29dom96It would be rather cool to port it to Nim.
20:15:37Calinouyeah, I almost wanted to make a rythm game once
20:15:48Calinoubut it's not easy, you need to store scores, and have an editor for them
20:26:13*Sembei joined #nim
20:28:58krux02-dom96: yes heared of it
20:29:47krux02-but I am not really a fan of guitar hero nor its clones
20:30:05krux02-if I port something that it should be something that I enjoy, too.
20:30:44*McSoFake quit (Quit: leaving)
20:30:51krux02-also I don't think that fret's on fire is really that great fo a concept anymore, because more and more keyboards are non-standard (laptops and small sized keyboards)
20:33:28*Snircle joined #nim
20:34:22*shashlick quit (Ping timeout: 260 seconds)
20:44:08*Sentreen quit (Ping timeout: 260 seconds)
20:46:39*zachcarter joined #nim
20:48:49*rauss quit (Quit: WeeChat 1.7.1)
20:58:20*Sentreen joined #nim
21:00:40FromGitter<TiberiumPY> Hmm, would it be hard to implement this protocol? http://wiki.vg/Protocol
21:01:56FromGitter<TiberiumPY> (i mean packing and unpacking values)
21:03:10dom96ooh, minecraft
21:03:13dom96Sounds like fun
21:03:29dom96Check to see if there are any unpacking Nimble packages
21:03:47dom96If not then maybe you could reimplement Python's in Nim?
21:05:24dom96As for your question, implementing the pure essentials of that protocol shouldn't be too difficult
21:05:51dom96It would make sense to have a library that makes unpacking easier though
21:08:14FromGitter<edlich_twitter> Sorry: is there an echo without newline? like write(STDOUT, "myMessage)
21:09:25FromGitter<TiberiumPY> echo "hello"
21:09:28FromGitter<TiberiumPY> :D
21:09:36FromGitter<edlich_twitter> no this does a newline.
21:09:39FromGitter<TiberiumPY> Ah
21:09:40FromGitter<TiberiumPY> import os
21:10:10FromGitter<TiberiumPY> stdout.write("go")
21:10:24FromGitter<edlich_twitter> :-) thx!!
21:10:25FromGitter<TiberiumPY> I may be wrong :)
21:11:09FromGitter<edlich_twitter> works! Thanks. Without any import.
21:16:32*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
21:18:45FromGitter<TiberiumPY> dom96: there's two choices: port from C (CPython):https://github.com/python/cpython/blob/master/Modules/_struct.c or RPython(PyPy) : https://github.com/mozillazg/pypy/blob/eea0db70f96338d036569109a164edf31b093ba1/pypy/module/struct/interp_struct.py and https://github.com/mozillazg/pypy/blob/eea0db70f96338d036569109a164edf31b093ba1/pypy/module/struct/formatiterator.py
21:19:14FromGitter<TiberiumPY> But I think I know what I will use as a reference :)
21:19:48dom96:)
21:19:50federico3given B = ref object of A, can I run a specific proc/method "foo" for B in "for x in @[A(), B()]: foo(x)" ?
21:19:56dom96You can also look at the docs and try implementing it that way
21:21:02dom96federico3: the foo() defined for B will be run on the B()
21:21:14dom96and the foo() defined for A will be run on the A()
21:21:20dom96assuming they are methods
21:21:40dom96Maybe you could do: foo(x.B)?
21:23:03FromGitter<TiberiumPY> Wait, maybe we can just use cast ? :D
21:23:32FromGitter<TiberiumPY> because this Python struct module unpacks C structure
21:23:42FromGitter<TiberiumPY> *structs
21:23:57federico3dom96: aha, found the issue: I was actually trying to run method for B and C, both subclasses of A, without having a method for A
21:24:35dom96Tiberium: You might be able to, yeah.
21:24:46dom96Tiberium: Be careful of little-endian vs. big-endian
21:26:13FromGitter<TiberiumPY> Sadly this protocol used big endian
21:40:37FromGitter<Varriount> euantor: In python world, design tends to trump speed.
21:41:11euantorThat seems to be the case. That library does look nice
21:41:33FromGitter<Varriount> The reason being that speed is rarely a constraint
21:51:17*Matthias247 quit (Read error: Connection reset by peer)
21:54:23*Trustable quit (Remote host closed the connection)
21:57:32*zachcarter quit (Read error: Connection reset by peer)
21:57:50*zachcarter joined #nim
22:04:11*yglukhov quit (Remote host closed the connection)
22:10:34*bjz joined #nim
22:10:59*yglukhov joined #nim
22:18:55*willprice94 quit (Ping timeout: 255 seconds)
22:30:29*devted quit (Quit: Sleeping.)
22:40:07*nsf quit (Quit: WeeChat 1.7)
22:44:28*sz0 quit (Quit: Connection closed for inactivity)
22:46:26*krux02- quit (Remote host closed the connection)
22:49:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:56:40*Sembei quit (Ping timeout: 260 seconds)
23:04:27*bjz joined #nim
23:12:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:21:02*vlad1777d quit (Quit: Leaving)
23:35:13zachcarterI put up a new front end for the website but I’m still getting the old css for some reason
23:37:28zachcarterdom96: does cloudflare need to have its caches cleared for stuff like that?
23:44:26zachcarterhttp://imgur.com/a/unjKJ
23:44:32zachcarterhere’s what it should look like ;)
23:51:20dom96you might be able to append ?somethign_random_and_unique to the CSS url every time you update it
23:51:28dom96I think the CSS is primarily cached
23:51:30dom96the HTML not so much
23:52:25zachcarterhrm okay
23:52:29dom96I cleared for you now anyway
23:52:33zachcarterthank you
23:52:35dom96but I must head to bed
23:52:38dom96see you tomorrow
23:52:43zachcartergood night!